I get the following error when using xtunit with nunit. I want to use the rollback attribute from xtunit.
I m runnign nunit from the gui
Server stack trace:
at System.Data.Common.ITransactionExportFactory.Create(UInt32 DTCLength, Byte[] DTCAddr, ITransactionExport& export)
at System.Data.SqlClient.Transaction.CreateTransactionExport(Byte[] dtcAddr, UInt32 dtcLength, ITransaction transaction, ITransactionExport& transactionExport)
at System.Data.SqlClient.Transaction.GetTransactionCookie(Byte[] dtcAddr, ITransaction transaction, ITransactionExport& transactionExport, Byte[]& cookie, Int32& length)
at System.Data.SqlClient.SqlInternalConnection.EnlistNonNullDistributedTransaction(ITransaction transaction)
at System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction(ITransaction newTransaction, Guid newTransactionGuid)
at System.Data.SqlClient.SqlInternalConnection.EnlistDistributedTransaction()
at System.Data.SqlClient.SqlInternalConnection.Activate(Boolean isInTransaction)
at System.Data.SqlClient.SqlConnection.Open()
....
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
i have a base class which inherits from a base class
public class test
Inherits TeamAgile.ApplicationBlocks.Interception.UnitTestExtensions.ExtensibleFixture
Related
Ok, first off I am confused on what is happening, I open up the code Blankpage.xml and click design view, but when I click on design view I get an error that says this
System.UnauthorizedAccessException
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.DirectInvoke[T](WaitHandle abort, Func`1 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue] (RemoteHandle`1 targetObject, Func`1 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalOut[TResult,TValue](RemoteHandle`1 targetObject, Func`2 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner(IHostSourceItem item, IHostTextEditor editor)
at Microsoft.Expression.DesignHost.IsolatedDesignerService.CreateDesignerViewInfo(IIsolationTarget isolationTarget, IHostSourceItem item, IHostTextEditor editor, CancellationTokenSource cancelSource)
System.UnauthorizedAccessException
Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
Server stack trace:
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.WaitForCompletion(BlockingCall call)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Invoke(BlockingCall call)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.CallQueue.Invoke[T](Func`1 func, WaitHandle aborted)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.MarshalIn[TResult](IRemoteObject targetObject, Func`1 func)
at Microsoft.Expression.DesignHost.Isolation.Remoting.RemoteDesignerService.Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor)
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Expression.DesignHost.Isolation.Remoting.IRemoteDesignerService.CreateDesigner(IRemoteHostSourceItem remoteItem, IRemoteHostTextEditor remoteEditor)
at Microsoft.Expression.DesignHost.Isolation.Remoting.LocalDesignerService.<>c__DisplayClass8. <Microsoft.Expression.DesignHost.IDesignerService.CreateDesigner>b__7(IRemoteDesignerService d)
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.<>c__DisplayClass4`2.<MarshalOut>b__3()
at Microsoft.Expression.DesignHost.Isolation.Remoting.ThreadMarshaler.DirectInvoke[T](WaitHandle abort, Func`1 func)
... I cant figure out what is wrong, This happened right after I deployed my project as a windows 8 metro application
I am getting the following error while I invoke WCF service from time to time. Quick reply would be appreciated
Cannot make a call on this channel because a call to Open() is in progress.
Full exception details
Timestamp: 15/03/2012 2:38:06 AM
Message: HandlingInstanceID: 9727709e-2d51-43d3-b45e-58c105cc3791
An exception of type 'System.InvalidOperationException' occurred and was caught.
03/15/2012 13:38:06
Type : System.InvalidOperationException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 Message : Cannot make a call on this channel because a call to Open() is in progress.
Source : mscorlib
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void HandleReturnMessage(System.Runtime.Remoting.Messaging.IMessage, System.Runtime.Remoting.Messaging.IMessage)
Stack Trace :
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfOpening()
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Choosi.Centrix.UnderwriterWebService.UnderwrittingService.IService.UpdateApplicationDetails(AppStatus appStatus, Nullable`1 ruwStatus, MoreInfoRequired[] moreInfoRequiredList, Int32 uwQuestionSetInstanceId)
regrads,
Raj
I am getting the below error when i call "NServiceBus.Host.exe". The issue appears to be itextsharp.dll. I've read that i can use
"Configure.With(AllAssemblies.Except("itextsharp.dll"))... // rest of your config"
But i'm using the following sample and not sure where to add this property.
http://docs.particular.net/samples/web/asp-mvc-application/
#
Unhandled Exception: Magnum.StateMachine.StateMachineException: Exception occurr
ed in Topshelf.Internal.ServiceController1[[NServiceBus.Host.Internal.GenericHo
st, NServiceBus.Host, Version=2.6.0.1504, Culture=neutral, PublicKeyToken=9fc386
479f8a226c]] during state Initial while handling OnStart ---> System.Exception:
Exception when starting endpoint, error has been logged. Reason: Could not load
file or assembly 'file:///D:\dev\MYSITE\MYSITE.EStore\EStore.Server\bin\Debug\itexts
harp.dll' or one of its dependencies. Operation is not supported. (Exception fro
m HRESULT: 0x80131515)
at NServiceBus.Host.Internal.GenericHost.Start() in d:\BuildAgent-02\work\20b
5f701adefe8f8\src\host\NServiceBus.Host\Internal\GenericHost.cs:line 90
at Magnum.StateMachine.EventActionList1.Execute(T stateMachine, Event event,
Object parameter) in :line 0
--- End of inner exception stack trace ---
Server stack trace:
at Magnum.StateMachine.ExceptionActionDictionary1.HandleException(T stateMac
hine, Event event, Object parameter, Exception exception) in :line 0
at Magnum.StateMachine.EventActionList1.Execute(T stateMachine, Event event,
Object parameter) in :line 0
at Magnum.StateMachine.State1.RaiseEvent(T instance, BasicEvent1 eevent, Ob
ject value) in :line 0
at Magnum.StateMachine.StateMachine`1.RaiseEvent(Event raised) in :line 0
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(
IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInCont
ext, Object[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMes
sage msg, Int32 methodPtr, Boolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage req
Msg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa
ta, Int32 type)
at Topshelf.Internal.ServiceControllerProxy.Start()
at Topshelf.Internal.ServiceCoordinator.Start() in d:\dev\open-source\topshel
f\src\Topshelf\Internal\ServiceCoordinator.cs:line 54
at Topshelf.Internal.Hosts.ConsoleHost.Run() in d:\dev\open-source\topshelf\s
rc\Topshelf\Internal\Hosts\ConsoleHost.cs:line 53
at NServiceBus.Host.Program.Main(String[] args) in d:\BuildAgent-02\work\20b5
f701adefe8f8\src\host\NServiceBus.Host\Program.cs:line 103
When NserviceBus host starts it tries to retrieve all types from assemblies you specify.
In the sample you provide it uses NServiceBus.Configure.WithWeb() method.
This is the same as to call NServiceBus.Configure.With(AppDomain.CurrentDomain.DynamicDirectory)
You get the excpetion because "itextsharp.dll" cannot be loaded to AppDomain (this is done by calling Assembly.LoadFrom(file.FullName) method).
To fix the issue, you may manually specify assemblies you need to scan by using one of NServiceBus.Configure.With() overloads.
I am getting the exception below in my web application:
"The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state"
Stack Trace:
" Server stack trace: at
System.ServiceModel.Channels.CommunicationObject.Close(TimeSpan
timeout) Exception rethrown at [0]: at
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
reqMsg, IMessage retMsg) at
System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
msgData, Int32 type) at
System.ServiceModel.ICommunicationObject.Close(TimeSpan timeout)
at
System.ServiceModel.ClientBase1.System.ServiceModel.ICommunicationObject.Close(TimeSpan
timeout) at System.ServiceModel.ClientBase1.Close() at
System.ServiceModel.ClientBase`1.System.IDisposable.Dispose() at
System.Web.UI.WebControls.ObjectDataSourceView.ReleaseInstance(Object
instance) at
System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments
arguments) at System.Web.UI.WebControls.ObjectDataSource.Select()
at BudgeteerWeb.EditTransaction.Page_Load(Object sender, EventArgs e)
in
C:\Develop\Budgeteer\BudgeteerWeb\BudgeteerWeb\MemberPages\Transactions\Edit.aspx.vb:line
27"
I am calling a WCF Service from within a select method used by a ObjectDataSource. Everything works OK if I'm not using message-based security. But as soon as I turn on the wsHttpBinding with the ClientCredentials, I get the above error. Not sure what I'm missing.
ASP Code:
Code Behind:
Function That is used by objectDataSource select method:
Protected Function getTransaction(ByVal userID As String, ByVal transactionID As Int64)
As BudgeteerService.Transaction
Dim transaction As BudgeteerService.Transaction = New BudgeteerService.Transaction
transaction = wcfProxy.GetTransaction(userID, transactionID)
Return transaction
End Function
Try
transactionID = Int64.Parse(Request.QueryString("TransactionID"))
Dim userIdParm As Parameter = New Parameter
TransactionDataSource.Select() '**EXCEPTION GETS THROWN HERE**
FormView1.DataSource = TransactionDataSource
FormView1.DataBind()
Catch timeOutEx As TimeoutException
Throw timeOutEx
Catch comEx As CommunicationException
Throw comEx
Catch ex As Exception
Throw New Exception("An error occured while trying to retrieve this transaction")
End Try
Thanks in advance.
I created a simple WCF demo:
Server Side:
namespace ServerSide
{
class Program
{
static void Main(string[] args)
{
System.ServiceModel.ServiceHost host =
new System.ServiceModel.ServiceHost(typeof(HelloIndigo.HelloIndigoService), new Uri("http://locahost:8000/HelloIndigo"));
host.AddServiceEndpoint(typeof(HelloIndigo.IHelloIndigoService), new System.ServiceModel.BasicHttpBinding(), "HelloIndigoService");
host.Open();
Console.Write("Terminate Server");
Console.ReadLine();
}
}
}
Client Side:
namespace ClientSide
{
class Program
{
static void Main(string[] args)
{
System.ServiceModel.EndpointAddress ep =
new System.ServiceModel.EndpointAddress("http://locahost:8000/HelloIndigo/HelloIndigoService");
IHelloIndigoService proxy =
System.ServiceModel.ChannelFactory<IHelloIndigoService>.CreateChannel(new System.ServiceModel.BasicHttpBinding(), ep);
string s = proxy.HelloIndigo();
Console.WriteLine(s);
Console.ReadLine();
}
}
}
Then, run ServerSide, when I tried to run the CLientSide, I got following error msg:
An error occurred while receiving the HTTP response to http://locahost:8000/HelloIndigo/HelloIndigoService. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details.
And the error details:
System.ServiceModel.CommunicationException was unhandled
Message="An error occurred while receiving the HTTP response to http://locahost:8000/HelloIndigo/HelloIndigoService. This could be due to the service endpoint binding not using the HTTP protocol. This could also be due to an HTTP request context being aborted by the server (possibly due to the service shutting down). See server logs for more details."
Source="mscorlib"
StackTrace:
Server stack trace:
at System.ServiceModel.Channels.HttpChannelUtilities.ProcessGetResponseWebException(WebException webException, HttpWebRequest request, HttpAbortReason abortReason)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Dispatcher.RequestChannelBinder.Request(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs)
at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at ClientSide.IHelloIndigoService.HelloIndigo()
at ClientSide.Program.Main(String[] args) in E:\My_Test\Test_for_VS2008\WCF_TestLessonOne_Client\ClientSide\Program.cs:line 16
at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Net.WebException
Message="The underlying connection was closed: An unexpected error occurred on a receive."
Source="System"
StackTrace:
at System.Net.HttpWebRequest.GetResponse()
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout)
InnerException: System.IO.IOException
Message="Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host."
Source="System"
StackTrace:
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.PooledStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.Connection.SyncRead(HttpWebRequest request, Boolean userRetrievedStream, Boolean probeRead)
InnerException: System.Net.Sockets.SocketException
Message="An existing connection was forcibly closed by the remote host"
Source="System"
ErrorCode=10054
NativeErrorCode=10054
StackTrace:
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
InnerException:
Is your machine called locahost ?? Typically, those machines are called localhost - so try this Url for your service (both on server and client side):
new Uri("http://localhost:8000/HelloIndigo")
With this change, I was able to re-create your sample without any issues whatsoever.