我在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方案)
'net.pipe://localhost/MyAccountService/v1.0/AccountService.svc‘的ChannelDispatcher与合同“IAccountService”不能打开它的IChannelListener。
我在IIS中的高级站点设置中添加了http、net.pipe条目。
还通过控制面板设置安装并启用了对WCF服务的非HTTP支持。
在8个.svc服务中,只有一个这样的服务能够获得端口,我可以浏览它的.SVC端点
当为netnamedPipe绑定配置所有其他服务时,都会出现上述错误。
有人能引导我吗,需要做些什么才能让他们都能抓住端口,让他们能够到达。
发布于 2012-02-25 13:19:56
这个问题在于如何使议定书处于正确的位置。以前,我已经在站点级别启用了net.pipe协议。
在托管服务的每个虚拟路径上启用net.pipe协议之后。啊,真灵。
发布于 2012-02-09 16:16:23
netNamedPipe绑定是唯一的,用于同一台机器上的通信,您不能从远程机器调用这样的端点。
这就是你想要做的吗?
netNamedPipe绑定对于同一台机器上的应用程序内部通信是很好的--但实际上并不适用于其他任何东西。
https://stackoverflow.com/questions/9214390
复制相似问题