I'm working on a WCF service and and Im testing it out in Cassini. I also have a console app and has a web ref. to the svc hosted in cassini. This works fine and I'm able to invoke to service method. But when I deploy the svc to IIS and I try to run to console app I'm getting this error.
System.ServiceModel.FaultException`1 was unhandled
Message=There was an error in deserializing one of the headers in message NotifRQRequest. Please see InnerException for more details.
Source=mscorlib
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message
reply, MessageFault fault, String action, MessageVersion version,
FaultConverter faultConverter)
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
operation, ProxyRpc& rpc)
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 TestConsole.ServiceReference1.IPush.RQ(NotifRQRequest request)
at TestConsole.ServiceReference1.PushClient.TestConsole.ServiceReference1.IPush.NotifRQ(NotifRQRequest
request) in ServiceReference1\Reference.cs:line 37165
at TestConsole.ServiceReference1.Client.RQ(Security Security, Action Action, MessageID MessageID, ReplyTo ReplyTo, To To,
NotifRQ notifRQ1) ServiceReference1\Reference.cs:line 37176
at TestConsole.Program.Main(String[] args)
at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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, Boolean
ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
I'm running a x64 envt. and even tried changing to different app pools.
Any suggestions or hinds would be greatly appreciated.
Thanks,
EDIT 1:
Just noticed one thing. The svc uses about 5 xml namespaces that are listed in the wsdl. In cassini, I can browse then i.e. I can hit localhost/Notification/NotificationService.svc?xsd=xsd0 but I cant do the same on IIS!!!
<xsd:schema targetNamespace="http://www.opentravel.org/OTA/2003/05/Imports">
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd0" namespace="http://www.opentravel.org/OTA/2003/05"/>
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd1" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd3" namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing"/>
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd2" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
<xsd:import schemaLocation="http://p/Notification/NotificationService.svc?xsd=xsd4" namespace="http://htng.org/2011A"/>
</xsd:schema>
EDIT 2:
It appears that this seems to be happening only on a 64 bit machine and works fine on a 32bit.
Turned out to be an issue with the Redirect module configuration specified in web.config
Related
I've recently been following this article on how to set up a 3-party queueing system with MSMQ, wherein the publisher, queue server and subscriber are all on separate systems within an Active Directory domain. I've succeeded in completing Part 1 and the first half of Part 2. However, when I continue with the latter half of Part 2 and enable Transport security, I receive the following error: An error occurred when converting the 'mymsmqservermachine.mydomain.network.ads\private$\Path/To/MyQueuedService.svc' queue path name to the format name: Unrecognized error -1072824300 (0xc00e0014). All operations on the queued channel failed. Ensure that the queue address is valid. MSMQ must be installed with Active Directory integration enabled and access to it is available.
I've verified the following:
Active Directory Integration for MSMQ is enabled on all the machines in the 3-party system, per this StackOverflow post.
The URL to the queue remains exactly the same as it was prior to enabling security, which worked just fine, no parsing errors whatsoever.
I've following the instructions provided by Windows when installing MSMQ here.
The relevant parts of the stack trace I get are:
at System.ServiceModel.Channels.MsmqFormatName.FromQueuePath(String queuePath)
at System.ServiceModel.Channels.MsmqUri.ActiveDirectory.UriToFormatName(Uri uri)
at System.ServiceModel.Channels.MsmqOutputChannel.OpenQueue()
--- End of inner exception stack trace ---
Server stack trace:
at System.ServiceModel.Channels.MsmqOutputChannel.OpenQueue()
at System.ServiceModel.Channels.MsmqOutputChannel.OnOpenCore(TimeSpan timeout)
at System.ServiceModel.Channels.MsmqOutputChannel.OnBeginOpen(TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.CommunicationObject.OpenAsyncResult.InvokeOpen()
at System.ServiceModel.Channels.CommunicationObject.OpenAsyncResult..ctor(CommunicationObject communicationObject, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.CommunicationObject.BeginOpen(TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.OnBeginOpen(TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.CommunicationObject.OpenAsyncResult.InvokeOpen()
at System.ServiceModel.Channels.CommunicationObject.OpenAsyncResult..ctor(CommunicationObject communicationObject, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.CommunicationObject.BeginOpen(TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.BeginCall(ServiceChannel channel, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.BeginCallOnce(TimeSpan timeout, CallOnceManager cascade, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.BeginEnsureOpened(TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureOpen(Boolean completedSynchronously)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureInteractiveInit(IAsyncResult result, Boolean completedSynchronously)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureInteractiveInit()
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin()
at System.ServiceModel.Channels.ServiceChannel.BeginCall(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, TimeSpan timeout, AsyncCallback callback, Object asyncState)
at System.ServiceModel.Channels.ServiceChannel.BeginCall(ServiceChannel channel, ProxyOperationRuntime operation, Object[] ins, AsyncCallback callback, Object asyncState)
at System.Threading.Tasks.TaskFactory`1.FromAsyncImpl[TArg1,TArg2,TArg3](Func`6 beginMethod, Func`2 endFunction, Action`1 endAction, TArg1 arg1, TArg2 arg2, TArg3 arg3, Object state, TaskCreationOptions creationOptions)
at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.CreateTask(ServiceChannel channel, ProxyOperationRuntime operation, Object[] inputParameters)
at System.ServiceModel.Channels.ServiceChannelProxy.TaskCreator.CreateTask(ServiceChannel channel, 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)
Based on the content of the stack trace, it appears that the failure is coming from resolving the queue name within Active Directory. I've tried the following to attempt to resolve such a failure:
Simplifying the name to contain no periods or slashes (didn't work)
Using a public queue instead of a private queue, in the event that this step was omitted from the original tutorial on MSDN (it wasn't, didn't work)
At this point, I'm out of ideas. Has anybody encountered this error when using WCF with net.msmq bindings before and solved their issue ?
EDIT: When running the following test code from the same machine and same user, I'm able to send a message to the queue perfectly fine:
Me.TestContext.WriteLine("Executing under user '{0}'", WindowsIdentity.GetCurrent().Name)
Dim msg = New System.Messaging.Message()
msg.Body = "This is a test message"
msg.Label = "Test Message"
msg.Formatter = new ActiveXMessageFormatter()
Dim queue = new MessageQueue("FormatName:DIRECT=OS:mymsmqservermachine.mydomain.network.ads\private$\Path/To/MyQueuedService.svc")
queue.Send(msg)
By pure fluke, I stumbled across the solution, and I recorded it in my blog.
The gist of the solution was that I had to add a DNS identity for my WCF endpoint binding in my client:
Dim endpointAddress = New EndpointAddress(queueUri, EndpointIdentity.CreateDnsIdentity(queueUri.Host))
Dim netMsmqBinding = New NetMsmqBinding With
{
.Durable = true,
.ExactlyOnce = false,
.UseActiveDirectory = false,
.Security = New NetMsmqSecurity With
{
.Mode = NetMsmqSecurityMode.Transport
}
}
Return New ChannelFactory(Of ICwteCentralPublishingServiceChannel)(netMsmqBinding, endpointAddress)
I apologize to the world for the Visual Basic code, it's a legacy application and wasn't my choice.
I am trying to access a web service using WCF client application in CS, when trying to access the web method. I am getting the forbidden error.
Binding configuration:basicHttpBinding
endpoint address=http://xxxxx/yyyy/WebServices/Soap/Query.svc
I noticed 1 more thing - when I try to add the service reference to WCF through VS - it is https://xxxx/yyyy/Webservices/Soap but in app Config it shows http.
Does anyone know how to handle this or what I am missing?
Please do help for the same.
Here is the call stack for the same:
Server stack trace:
at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
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 ConsoleApplication1.xxxxxx.Query.Result(String userName, String password, String workflowName, String queryId, QueryData data)
at ConsoleApplication1.UTPQueryService.QueryClient.Result(String userName, String password, String workflowName, String queryId, QueryData data) in
I successfully installed the Redis server on my Windows 7 machine.
Did a quick hands on, everything works as expected.
(installed using the MSI installer from https://github.com/MSOpenTech/redis )
I am using the StackExchange redis client C# for connecting to Redis server.
RedisClient
P.S. : I did not build the application on my machine as I am having VS 2010 and that was throwing some error. So i installed the nuget package and now my Test App in C# has the assembly StackExchange.Redis
My console app is simple with just one line of code
ConnectionMultiplexer redis = ConnectionMultiplexer.Connect("localhost:6379,allowAdmin=true");
It gives me an error :
System.AggregateException was unhandled
HResult=-2146233088
Message=One or more errors occurred.
Source=mscorlib
StackTrace:
at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout)
at StackExchange.Redis.ConnectionMultiplexer.ConnectImpl(Func`1 multiplexerFactory, TextWriter log) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 817
at StackExchange.Redis.ConnectionMultiplexer.Connect(String configuration, TextWriter log) in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 795
at testapp.Program.Main(String[] args) in D:\_Work\TestApp\Program.cs:line 64
at System.AppDomain._nExecuteAssembly(RuntimeAssembly 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.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException: System.Security.VerificationException
HResult=-2146233075
Message=Method System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1[System.Boolean].AwaitUnsafeOnCompleted: type argument 'Microsoft.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[StackExchange.Redis.ServerEndPoint]' violates the constraint of type parameter 'TAwaiter'.
Source=StackExchange.Redis
StackTrace:
at StackExchange.Redis.ConnectionMultiplexer.<ReconfigureAsync>d__2d.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.Start[TStateMachine](TStateMachine& stateMachine)
at StackExchange.Redis.ConnectionMultiplexer.ReconfigureAsync(Boolean first, Boolean reconfigureAll, TextWriter log, EndPoint blame, String cause, Boolean publishReconfigure, CommandFlags publishReconfigureFlags)
at StackExchange.Redis.ConnectionMultiplexer.<>c__DisplayClass29.<ConnectImpl>b__26() in c:\TeamCity\buildAgent\work\3ae0647004edff78\StackExchange.Redis\StackExchange\Redis\ConnectionMultiplexer.cs:line 815
at System.Threading.Tasks.Task`1.InnerInvoke()
at System.Threading.Tasks.Task.Execute()
InnerException:
For anyone else who stumbles on this the cause is a version mismatch with the Microsoft.Bcl package. Run the command Update-Package Microsoft.Bcl to resolve.
see http://blog.marcgravell.com/2014/03/so-i-went-and-wrote-another-redis-client.html?showComment=1405397410965#c8649668071319126908
I created a simple orchestration to call a WCF service and get response from it. Web service method is very simple:
string GetSimple(int value)
BizTalk monitors a folder and receives activation message using FILE adapter from there, then constructs proper message and calls the web service. But fails with this exception:
Error Description: System.Configuration.ConfigurationErrorsException: Couldn't find type for class System Diagnostics.TextWriterTraceListener.
Server stack trace:
at System.Diagnostics.TraceUtils.GetRuntimeObject(String className, Type baseType, String initializeData)
at System.Diagnostics.TypedElement.BaseGetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at System.Diagnostics.ListenerElement.GetRuntimeObject()
at System.Diagnostics.ListenerElementsCollection.GetRuntimeObject()
at System.Diagnostics.TraceSource.Initialize()
at System.Net.Logging.InitializeLogging()
at System.Net.Logging.get_On()
at System.Net.WebRequest.Create(Uri requestUri, Boolean useUriBase)
at System.Net.WebRequest.Create(Uri requestUri)
at System.ServiceModel.Channels.HttpChannelFactory.GetWebRequest(EndpointAddress to, Uri via, NetworkCredential credential, TokenImpersonationLevel impersonationLevel, AuthenticationLevel authenticationLevel, SecurityTokenProviderContainer proxyTokenProvider, SecurityTokenContainer clientCertificateToken, TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelFactory.GetWebRequest(EndpointAddress to, Uri via, SecurityTokenProviderContainer tokenProvider, SecurityTokenProviderContainer proxyTokenProvider, SecurityTokenContainer clientCertificateToken, TimeSpan timeout)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.GetWebRequest(EndpointAddress to, Uri via, SecurityTokenContainer clientCertificateToken, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.GetWebRequest(EndpointAddress to, Uri via, TimeoutHelper& timeoutHelper)
at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelAsyncRequest.BeginSendRequest(Message message, TimeSpan timeout)
at System.ServiceModel.Channels.RequestChannel.BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Dispatcher.RequestChannelBinder.BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartSend(Boolean completedSynchronously)
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin()
at System.ServiceModel.Channels.ServiceChannel.BeginCall(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, TimeSpan timeout, AsyncCallback callback, Object asyncState)
at System.ServiceModel.Channels.ServiceChannel.BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, Object state)
at System.ServiceModel.Channels.ServiceChannel.BeginRequest(Message message, AsyncCallback callback, Object state)
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.Channels.IRequestChannel.BeginRequest(Message message, AsyncCallback callback, Object state)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendRequestMessage(IBaseMessage bizTalkMessage, IRequestChannel channel)
at Microsoft.BizTalk.Adapter.Wcf.Runtime.WcfClient`2.SendMessage(IBaseMessage bizTalkMessage)
Exception type: XlangSoapException
Source: Microsoft.XLANGs.BizTalk.Engine
Target Site: Void VerifyTransport(Microsoft.XLANGs.Core.Envelope, Int32, Microsoft.XLANGs.Core.Context)
The following is a stack trace that identifies the location where the exception occured
at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.VerifyTransport(Envelope env, Int32 operationId, Context ctx)
at Microsoft.XLANGs.Core.Subscription.Receive(Segment s, Context ctx, Envelope& env, Boolean topOnly)
at Microsoft.XLANGs.Core.PortBase.GetMessageId(Subscription subscription, Segment currentSegment, Context cxt, Envelope& env, CachedObject location)
at Orch.Orc.segment1(StopConditions stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
I couldn't find TextWriterTraceListener. Where is it? How to get rid of this exception?
It seems there's a problem with the config file of the WCF service or BTSNtSvc.exe.config. BizTalk seems to be sending the correct request.
Most likely, your config around logging messages from WCF is having issues or BTSNtSvc.exe.config having incorrect parameters around logging.
You may want to call the service from standard .net client to narrow down the problem.
HTH
I call a method in a WCF proxy, where the binding is named pipes. At the moment, the code fails with an exception (related to wmi - what the code does), but when I then execute another method in the same proxy, I get this error:
There was an error writing to the pipe: Unrecognized error 232 (0xe8).
Obviously, this doesn't help much. Stacktrace is:
Server stack trace: at
System.ServiceModel.Channels.StreamConnection.BeginWrite(Byte[]
buffer, Int32 offset, Int32 size, Boolean immediate, TimeSpan timeout,
AsyncCallback callback, Object state) at
System.ServiceModel.Channels.FramingDuplexSessionChannel.SendAsyncResult.WriteCore()
at
System.ServiceModel.Channels.FramingDuplexSessionChannel.SendAsyncResult..ctor(FramingDuplexSessionChannel
channel, Message message, TimeSpan timeout, AsyncCallback callback,
Object state) at
System.ServiceModel.Channels.FramingDuplexSessionChannel.OnBeginSend(Message
message, TimeSpan timeout, AsyncCallback callback, Object state) at
System.ServiceModel.Channels.OutputChannel.BeginSend(Message message,
TimeSpan timeout, AsyncCallback callback, Object state) at
System.ServiceModel.Dispatcher.DuplexChannelBinder.BeginRequest(Message
message, TimeSpan timeout, AsyncCallback callback, Object state) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartSend(Boolean
completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureOpen(IAsyncResult
result, Boolean completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureOpen(Boolean
completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureInteractiveInit(IAsyncResult
result, Boolean completedSynchronously) at
System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureInteractiveInit()
at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin()
at System.ServiceModel.Channels.ServiceChannel.BeginCall(String
action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
TimeSpan timeout, AsyncCallback callback, Object asyncState) at
System.ServiceModel.Channels.ServiceChannel.BeginCall(String action,
Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
AsyncCallback callback, Object asyncState) at
System.ServiceModel.Channels.ServiceChannelProxy.InvokeBeginService(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 x.xxx.xxxxx(String Path, AsyncCallback
callback, Object state) at x.xproxy.begininstall(String path,
AsyncCallback callback, Object state) in
C:\Users\project\AsyncProxy.cs:line 38 at
xxx.MainForm.begininstall(Object sender, EventArgs e) in
C:\Users\project\MainForm.cs:line 647 at
XPrintV7.MainForm.b__e() in
C:\Users\Gurdip\Desktop\xproject\MainForm.cs:line 664 at
System.Windows.Forms.Control.InvokeMarshaledCallbackDo(ThreadMethodEntry
tme) at
System.Windows.Forms.Control.InvokeMarshaledCallbackHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Object userData) at
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode
code, CleanupCode backoutCode, Object userData) at
System.Threading.ExecutionContext.RunInternal(ExecutionContext
executionContext, ContextCallback callback, Object state) at
System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state) at
System.Windows.Forms.Control.InvokeMarshaledCallback(ThreadMethodEntry
tme) at System.Windows.Forms.Control.InvokeMarshaledCallbacks()
What is the probable cause?
The error message tells you that the Win32 error ERROR_NO_DATA occurred when the client-side channel stack tried to send a message to the service over the named pipe. It's difficult to diagnose beyond that with just the info you have provided, but it probably indicates that the client and server ends of the named pipe have got into inconsistent states as a result of the preceding WMI error. Possibly your client-side code is not managing the state of the service proxy instance correctly when the WMI exception happens.
You should enable verbose WCF tracing on both client and service sides, which will provide a clearer picture of what is going on.
Also, posting some of your client code to show where the WMI exception occurs, and how the service proxy is dealt with in the exception handling, may enable someone to answer your question more precisely.