我在 IIS 7 上部署了 WCF 服务,并支持启用非 HTTP
在一个项目中,我公开了 8 种不同的服务,其wsHttp
端点工作正常。
我还想公开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(字符串方案)
[InvalidOperationException:'net.pipe://localhost/MyAccountService/v1.0/AccountService.svc' 上的 ChannelDispatcher 与合同 '"IAccountService"' 无法打开其 IChannelListener。]
我在 IIS 的高级站点设置中添加了 http,net.pipe 条目。
还通过控制面板设置安装和启用对 WCF 服务的非 HTTP 支持。
在 8 个 .svc 服务中,只有一个这样的服务能够获取端口,我可以浏览它的 .SVC 端点
为 netnamedPipe 绑定配置的所有其他服务都会给我上述错误。
有人可以指导我吗,需要做些什么才能使它们都停在港口并可以使用。