开发者

Cannot seem to fix "The protocol 'net.msmq' does not have an implementation of HostedTransportConfiguration type registered."

I am running on Windows 7/IIS 7.5, and have a web service set up to use net.msmq, but when I attempt to access the service using HTTP, I get the following error:

The protocol 'net.msmq' does not have an implementation of HostedTransportConfiguration type registered.

[InvalidOperationException: The protocol 'net.msmq' does not have an implementation of HostedTransportConfiguration type registered.]
   System.ServiceModel.AsyncResult.End(IAsyncResult result) +15778592
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15698937
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

I have set both http and net.msmq bindings on the site under which it resides, and have enabled both protocols ("http,net.msmq") on both the site and application.

I've looked at the article Debugging a Missing HostedTransportConfiguration Type and have run all the commands there, but none seemed to help; running sc query netmsmqactivator shows:

SERVICE_NAME: netmsmqactivator
        TYPE               : 20  WIN32_SHARE_PROCESS
        STATE              : 4  RUNNING
                                (STOPPABLE, PAUSABLE, ACCEPTS_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0

The App Pool that the application is running under right now is targeting .NET Framework v2.0, but if I change the app pool to target .NET Framework v4.0 (and make appropriate changes to the service's web.config to remove duplicate configSection definitions), I am able to see the WSDL just fine.

As far as I know, the web service is not meant to be run targeting .NET Framework v4.0; it is actually working for a colleague of mine (also running Windows 7), but comparing setups isn't viable at this time for numerous reasons.

Another note, may or may not be related: After attempting to access the service via HTTP and getting the above error, refreshing the service results in:

An item with the same key has already been added.

[ArgumentException: An item with the same key has already been added.]
   System.ServiceModel.AsyncResult.End(IAsyncResult result) +15778592
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.End(IAsyncResult result) +15698937
   System.ServiceModel.Activation.HostedHttpRequestAsyncResult.ExecuteSynchronous(HttpApplication context, Boolean flowContext) +265
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
   System.Web.HttpApp开发者_JAVA技巧lication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +171

This requires an app pool recycle to clear.

I don't have experience working with net.msmq, so I do not know what pertinent information I may have left out; please let me know what I've missed.


Figured it out: Not sure what was messed up, but turns out that uninstalling then reinstalling WCF Non-HTTP Activation fixed it.


If you are hosting an MSMQ/WCF service in IIS, you have to tell IIS to allow net.msmq protocol. It's in the advanced settings for the application or site in which you are hosting the service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜