WCF Service with WAS: Service Cannot Convert Path Name to Queue

I got a WCF service listening through WAS on MSMQ, which is on another server in the same domain.

The setup is as follows:

Server A: Windows Server 2008 hosts the WCF service in IIS.

Server B: Windows Server 2008 (Domain Controller) contains a private MSMQ (AD Integration).

In addition, I also received a console client running on server A, which sends a message to the service through MSMQ, also using WCF. At the moment, the whole setup works, and the service processes messages from the client. Client security mode is set to transport, and service security mode is set to none.

But when I switch the security mode of the service to transport, the message is no longer being processed. I activated tracing on the service and found out that it seems that the problem occurs when the service tries to access MSMQ on another server. A warning and error message (see below) can be seen in both security modes noneand transport, but if set none, the service seems to ignore the problem and, nevertheless, processes the messages.

The error message says:

'Murdock.ltportale.intern\ $\ EventSyncService/EventSynchorinzationService.svc' : -1072824300 (0xc00e0014). . , . MSMQ Active Directory .

, MSMQ , none. , MSMQ AD, 2 , .

, . transport , . , , .


:

 ...
 <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Warning">
     <TraceIdentifier>
         http://msdn.microsoft.com/de-DE/library/System.ServiceModel.Channels.MsmqQueueTransactionalStatusUnknown.aspx
     </TraceIdentifier>
     <Description>
         Cannot detect if the queue is transactional.
     </Description>
     <AppDomain>
         /LM/W3SVC/3/ROOT/EventSyncService-1-129509714416559522
     </AppDomain>
     <ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/StringTraceRecord">                               
         <FormatName> 
              DIRECT=OS:murdock.ltportale.intern\private$\EventSyncService/EventSynchorinzationService.svc
         </FormatName>
     </ExtendedData>
  </TraceRecord>
  ...

:

<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
    <System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
        <EventID>131075</EventID>
        <Type>3</Type>
        <SubType Name="Error">0</SubType>
        <Level>2</Level>
        <TimeCreated SystemTime="2011-05-27T12:04:11.5292297Z" />
        <Source Name="System.ServiceModel" />
        <Correlation ActivityID="{f89d797c-3d10-47a3-8dad-1b3200d3b868}" />
        <Execution ProcessName="w3wp" ProcessID="1764" ThreadID="6" />
        <Channel />
        <Computer>SPS2010-FBE</Computer>
    </System>
    <ApplicationData>
        <TraceData>
            <DataItem>
                <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Error">
                    <TraceIdentifier>
                        http://msdn.microsoft.com/de-DE/library/System.ServiceModel.Diagnostics.ThrowingException.aspx
                    </TraceIdentifier>
                    <Description>Throwing an exception.</Description>
                    <AppDomain>/LM/W3SVC/3/ROOT/EventSyncService-1-129509714416559522
                    </AppDomain>
                    <Exception>
                        <ExceptionType>
                            System.ServiceModel.MsmqException, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
                        </ExceptionType>
                        <Message>
                            An error occurred when converting the 'murdock.ltportale.intern\private$\EventSyncService/EventSynchorinzationService.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.
                        </Message>
                        <StackTrace>
                               at System.ServiceModel.Channels.MsmqFormatName.FromQueuePath(String queuePath)
                               at System.ServiceModel.Channels.MsmqVerifier.VerifyReceiver(MsmqReceiveParameters receiveParameters, Uri listenUri)
                               at System.ServiceModel.Channels.MsmqTransportBindingElement.BuildChannelListener[TChannel](BindingContext context)
                               at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
                               at System.ServiceModel.Channels.MessageEncodingBindingElement.InternalBuildChannelListener[TChannel](BindingContext context)
                               at System.ServiceModel.Channels.BinaryMessageEncodingBindingElement.BuildChannelListener[TChannel](BindingContext context)
                               at System.ServiceModel.Channels.BindingContext.BuildInnerChannelListener[TChannel]()
                               at System.ServiceModel.Channels.Binding.BuildChannelListener[TChannel](Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, BindingParameterCollection parameters)
                               at System.ServiceModel.Description.DispatcherBuilder.MaybeCreateListener(Boolean actuallyCreate, Type[] supportedChannels, Binding binding, BindingParameterCollection parameters, Uri listenUriBaseAddress, String listenUriRelativeAddress, ListenUriMode listenUriMode, ServiceThrottle throttle, IChannelListener&amp;amp; result, Boolean supportContextSession)
                               at System.ServiceModel.Description.DispatcherBuilder.BuildChannelListener(StuffPerListenUriInfo stuff, ServiceHostBase serviceHost, Uri listenUri, ListenUriMode listenUriMode, Boolean supportContextSession, IChannelListener&amp;amp; result)
                               at System.ServiceModel.Description.DispatcherBuilder.InitializeServiceHost(ServiceDescription description, ServiceHostBase serviceHost)
                               at System.ServiceModel.ServiceHostBase.InitializeRuntime()
                               at System.ServiceModel.ServiceHostBase.OnOpen(TimeSpan timeout)
                               at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout)
                               at System.ServiceModel.ServiceHostingEnvironment.HostingManager.ActivateService(String normalizedVirtualPath)
                               at System.ServiceModel.ServiceHostingEnvironment.HostingManager.EnsureServiceAvailable(String normalizedVirtualPath)
                               at System.ServiceModel.ServiceHostingEnvironment.EnsureServiceAvailableFast(String relativeVirtualPath)
                               at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.HandleRequest()
                               at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.BeginRequest()
                               at System.ServiceModel.Activation.HostedHttpRequestAsyncResult.OnBeginRequest(Object state)
                               at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke2()
                               at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.WorkItem.Invoke()
                               at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ProcessCallbacks()
                               at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.CompletionCallback(Object state)
                               at System.ServiceModel.Channels.IOThreadScheduler.CriticalHelper.ScheduledOverlapped.IOCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
                               at System.ServiceModel.Diagnostics.Utility.IOCompletionThunk.UnhandledExceptionFrame(UInt32 error, UInt32 bytesRead, NativeOverlapped* nativeOverlapped)
                               at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode, UInt32 numBytes, NativeOverlapped* pOVERLAP)
                        </StackTrace>
                        <ExceptionString>
                            System.ServiceModel.MsmqException: An error occurred when converting the 'murdock.ltportale.intern\private$\EventSyncService/EventSynchorinzationService.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.
                        </ExceptionString>
                    </Exception>
                </TraceRecord>
            </DataItem>
        </TraceData>
    </ApplicationData>
</E2ETraceEvent>

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <system.serviceModel>
      <bindings>
        <netMsmqBinding>
          <binding name="MsmqBindingNonTransactionalNoSecurity" exactlyOnce="false">
            <security mode="None"/>
          </binding>
          <binding name="MsmqBindingNonTransactionalTransportSecurity" exactlyOnce="false">
            <security mode="Transport"/>
          </binding>
        </netMsmqBinding>
      </bindings>
      <client>
        <endpoint name="EventSyncService.EventSynchorinzationService"
                  address="net.msmq://murdock.ltportale.intern/private/EventSyncService/EventSynchorinzationService.svc"
                  binding="netMsmqBinding" 
                  bindingConfiguration="MsmqBindingNonTransactionalTransportSecurity"
                  contract="SyncService.IEventSynchorinzationService" />
      </client>
    </system.serviceModel>
</configuration>

...
 <system.serviceModel>
    <bindings>
      <netMsmqBinding>
        <binding name="MsmqBindingNonTransactionalNoSecurity" exactlyOnce="false">
          <security mode="None" />
        </binding>
        <binding name="MsmqBindingNonTransactionalTransportSecurity" exactlyOnce="false">
          <security mode="Transport"/>
        </binding>
      </netMsmqBinding>
    </bindings>
    <services>
      <service name="EventSyncService.EventSynchorinzationService">
        <endpoint 
                  address="net.msmq://murdock.ltportale.intern/private/EventSyncService/EventSynchorinzationService.svc" 
                  binding="netMsmqBinding" 
                  bindingConfiguration="MsmqBindingNonTransactionalNoSecurity" 
                  contract="EventSyncService.IEventSynchorinzationService" />
      </service>
    </services>
  </system.serviceModel>
  <system.diagnostics>
    <trace autoflush="true" />
    <sources>
      <source name="System.ServiceModel"
              switchValue="Information, ActivityTracing"
              propagateActivity="true">
        <listeners>
          <add name="sdt"
              type="System.Diagnostics.XmlWriterTraceListener"
              initializeData= "c:\log\log.txt" />
        </listeners>
      </source>
    </sources>
  </system.diagnostics>
</configuration>
+3

All Articles