简体   繁体   English

在wcf服务中获取异常 - 不支持协议“net.pipe”

[英]Getting exception in wcf service - The protocol 'net.pipe' is not supported

I have deployment of WCF service on IIS 7 with support for Non-HTTP enabled 我在IIS 7上部署了WCF服务,并支持启用非HTTP

Under one project, I have exposed 8 different services with wsHttp endpoints which works fine. 在一个项目中,我已经使用wsHttp端点公开了8种不同的服务,这些服务工作正常。

I want to also expose NetNamedPipe bindings for the same services. 我还希望为相同的服务公开NetNamedPipe绑定。

My sample NetNamedPipe bindings . 我的样本NetNamedPipe绑定。 . .

<netNamedPipeBinding>
    <binding name="PassportIPCBasicEndpoint" 
         closeTimeout="00:05:00" openTimeout="00:05:00" receiveTimeout="00:10:00" 
         sendTimeout="00:05:00"
         maxBufferSize="2147483647" maxBufferPoolSize="2147483647" 
         maxReceivedMessageSize="2147483647" transferMode="Buffered"
         hostNameComparisonMode="Exact"  >
      <readerQuotas
           maxDepth="2147483647" maxStringContentLength="2147483647" 
           maxArrayLength="2147483647" maxBytesPerRead="2147483647" 
           maxNameTableCharCount="2147483647"/>
      <security mode="Transport">
         <transport protectionLevel="None" />
      </security>
   </binding>
</netNamedPipeBinding>

And my Service tags 还有我的服务标签

<service behaviorConfiguration="default" name="MyAccountService.AccountService">
   <host>
      <baseAddresses>
         <add baseAddress="http://localhost/MyAccountService/v1.0/AccountService.svc" />
      </baseAddresses>
   </host>
   <endpoint name="PassportIPCBasicEndpoint" 
       address="net.pipe://localhost/MyAccountService/v1.0/AccountService.svc" 
       binding="netNamedPipeBinding" 
       bindingConfiguration="PassportIPCBasicEndpoint" 
       contract="MyAccountService.IAccountService"/>
</service>

This gives me following exception : 这给了我以下异常:

The protocol 'net.pipe' is not supported. 不支持协议'net.pipe'。

[InvalidOperationException: The protocol 'net.pipe' is not supported.] System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetConfiguration(String scheme) [InvalidOperationException:不支持协议'net.pipe'。] System.ServiceModel.Activation.HostedTransportConfigurationManager.InternalGetConfiguration(String scheme)

[InvalidOperationException: The ChannelDispatcher at 'net.pipe://localhost/MyAccountService/v1.0/AccountService.svc' with contract(s) '"IAccountService"' is unable to open its IChannelListener.] [InvalidOperationException:合同为“ IAccountService”的位于“ net.pipe://localhost/MyAccountService/v1.0/AccountService.svc”处的ChannelDispatcher无法打开其IChannelListener。

I have added entry for http,net.pipe in advanced site settings in IIS. 我在IIS中的高级站点设置中添加了http,net.pipe的条目。

Non-HTTP support for WCF service is also installed and enabled through control panel settings. 还可以通过控制面板设置安装和启用对WCF服务的非HTTP支持。

out of 8 .svc services only one such service is able to get hold of port and I can browse it's .SVC endpoint 在8个.svc服务中,只有一个这样的服务能够获取端口,我可以浏览它的.SVC端点

all other services when configured for netnamedPipe binding give me above errors. 配置为netnamedPipe绑定时的所有其他服务给我上面的错误。

Can some body guide me, what needs to be done to make them all get hold on port and be accessible. 有些人可以指导我,需要做些什么才能使他们都能抓住港口并且可以进入。

This problem was with enabling the protocols at the correct place. 问题在于在正确的位置启用协议。 Previously i had enabled net.pipe protocol at site level. 以前,我在站点级别启用了net.pipe协议。

After enabling net.pipe protocol at each virtual path of the hosted services. 在托管服务的每个虚拟路径上启用net.pipe协议后。 It worked. 有效。

The netNamedPipe binding is only for on-the-same-machine communication - you cannot call such an endpoint from a remote machine. netNamedPipe绑定适用于同一台机器通信 - 您无法从远程计算机调用此类端点。

Is that what you're trying to do?? 那是你想要做的吗?

netNamedPipe binding is great for intra-application communication on the same machine - but not for anything else, really. netNamedPipe绑定非常适合同一台机器上的应用程序内通信 - 但实际上并非如此。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM