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

无人久伴 提交于 2019-12-08 05:28:57

问题


I have deployment of WCF service on IIS 7 with support for Non-HTTP enabled

Under one project, I have exposed 8 different services with wsHttp endpoints which works fine.

I want to also expose NetNamedPipe bindings for the same services.

My sample NetNamedPipe bindings . . .

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

[InvalidOperationException: The protocol 'net.pipe' is not supported.] 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.]

I have added entry for http,net.pipe in advanced site settings in IIS.

Non-HTTP support for WCF service is also installed and enabled through control panel settings.

out of 8 .svc services only one such service is able to get hold of port and I can browse it's .SVC endpoint

all other services when configured for netnamedPipe binding give me above errors.

Can some body guide me, what needs to be done to make them all get hold on port and be accessible.


回答1:


This problem was with enabling the protocols at the correct place. Previously i had enabled net.pipe protocol at site level.

After enabling net.pipe protocol at each virtual path of the hosted services. It worked.




回答2:


The netNamedPipe binding is only for on-the-same-machine communication - you cannot call such an endpoint from a remote machine.

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.



来源:https://stackoverflow.com/questions/9214390/getting-exception-in-wcf-service-the-protocol-net-pipe-is-not-supported

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!