当我尝试在Visual Studio中向我的WCF服务添加服务引用时,我收到错误"不支持协议'net.msmq'.
我已成功运行appcmd set site "Default Web Site" -+bindings.[protocol='net.msmq',bindingInformation='localhost']
,我可以在applicationHost.config文件中看到配置.由于我在visual studio中运行我的服务,我是否需要为我的特定应用程序启用net.msmq协议(appcmd set app"Default Web Site/MsmqService"/enabledProtocols:net.msmq)?我不知道怎么做,因为我的服务是在visual studio中运行的?如果我不需要这样做,还有什么可能是问题.这是我的配置.任何帮助赞赏..
<configuration>
<system.serviceModel>
<services>
<service name="MessageRoutingService"
behaviorConfiguration="ServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://localhost:29376" />
</baseAddresses>
</host>
<endpoint name="Response"
address="net.msmq://localhost/private/Response"
binding="netMsmqBinding"
bindingConfiguration="TransactedBinding"
contract="IResponse" />
<endpoint
address="mex"
binding="mexHttpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
<bindings>
<netMsmqBinding>
<binding name="TransactedBinding">
<security mode="None">
</security>
</binding>
</netMsmqBinding>
</bindings>
</system.serviceModel>
</configuration>
Run Code Online (Sandbox Code Playgroud)
您需要启用组件"Microsoft Message Queue(MSMQ)Server"(1)并在IIS(2)上的应用程序中添加"net.MSMQ"协议.
转到"Microsoft消息队列(MSMQ)服务器"下的"打开或关闭Windows功能"选中的组件中的"程序和功能".
转到IIS上的应用程序,单击"高级设置",然后"启用协议"添加此",net.MSMQ".
| 归档时间: |
|
| 查看次数: |
5619 次 |
| 最近记录: |