繁体   English   中英

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

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

我在IIS 7上部署了WCF服务,并支持启用非HTTP

在一个项目中,我已经使用wsHttp端点公开了8种不同的服务,这些服务工作正常。

我还希望为相同的服务公开NetNamedPipe绑定。

我的样本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>

还有我的服务标签

<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>

这给了我以下异常:

不支持协议'net.pipe'。

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

[InvalidOperationException:合同为“ IAccountService”的位于“ net.pipe://localhost/MyAccountService/v1.0/AccountService.svc”处的ChannelDispatcher无法打开其IChannelListener。

我在IIS中的高级站点设置中添加了http,net.pipe的条目。

还可以通过控制面板设置安装和启用对WCF服务的非HTTP支持。

在8个.svc服务中,只有一个这样的服务能够获取端口,我可以浏览它的.SVC端点

配置为netnamedPipe绑定时的所有其他服务给我上面的错误。

有些人可以指导我,需要做些什么才能使他们都能抓住港口并且可以进入。

问题在于在正确的位置启用协议。 以前,我在站点级别启用了net.pipe协议。

在托管服务的每个虚拟路径上启用net.pipe协议后。 有效。

netNamedPipe绑定适用于同一台机器通信 - 您无法从远程计算机调用此类端点。

那是你想要做的吗?

netNamedPipe绑定非常适合同一台机器上的应用程序内通信 - 但实际上并非如此。

暂无
暂无

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

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