在同一台机器上的另一个站点上,是否可以让运行在ASPX中的WCF客户端通过net.pipe调用SVC?
我有两个网站——一个是aspx文件,一个是wcf服务,有两个端点,一个是http,一个是命名管道。它们都在同一台机器上运行,因此它们似乎是使用net.pipe绑定的候选对象 aspx文件创建服务客户端并尝试调用net.pipe。我明白了: “/dev”应用程序中出现服务器错误。无法发送消息 已调度,因为服务位于终结点地址 “净。pipe://localhost/netNamedPipeBinding'不适用于 地址的协议。” 谷歌搜索表明这可能是一个安全问题(没有权限错误与没有侦听器错误相同),但我已经向[NETWORK]用户组授予NTFS权限,允许其使用服务访问网站文件,并且没有任何更改 带有aspx的站点正在使用表单身份验证(即不是windows身份验证),服务网站是匿名身份验证。web.config的net.pipe安全设置为=“无” 在本地,这很好——尽管我必须在控制台应用程序中运行命名管道主机,因为VisualStudiodev服务器不能执行命名管道。此外,Http端点在IIS上也可以正常工作 它正在运行.NET4.0、IIS7.5和Win2008 IIS配置 据我所知在同一台机器上的另一个站点上,是否可以让运行在ASPX中的WCF客户端通过net.pipe调用SVC?,wcf,netnamedpipebinding,net.pipe,Wcf,Netnamedpipebinding,Net.pipe,我有两个网站——一个是aspx文件,一个是wcf服务,有两个端点,一个是http,一个是命名管道。它们都在同一台机器上运行,因此它们似乎是使用net.pipe绑定的候选对象 aspx文件创建服务客户端并尝试调用net.pipe。我明白了: “/dev”应用程序中出现服务器错误。无法发送消息 已调度,因为服务位于终结点地址 “净。pipe://localhost/netNamedPipeBinding'不适用于 地址的协议。” 谷歌搜索表明这可能是一个安全问题(没有权限错误与没有侦听器错误相同),
- net.pipe已为服务网站启用,配置信息为*
- 已安装并启用WAS(通过windows功能)
- net.pipe侦听器Windows服务已启用
- 每个网站都是匿名访问(身份验证由第三方单点登录服务器完成)
- 每个网站都有自己的应用程序池(可能不相关)
- 服务站点处于web garden模式(可能不相关)
客户端配置(ASP.NET网站,同一台机器,不同于服务的VDIR)
(更改服务和合同名称以保护无辜者)
C#没有什么特别之处,只是添加服务引用生成的代理。(所有这些代码都可以与wsHttp绑定一起正常工作。当命名管道以这种方式托管在IIS中时,您无法设置其基址。因此,客户端无法找到该服务。有关详细信息,请查看此处的答案:
发布一些代码-两个站点的web.config等。我添加了相关配置。您可以添加一些有关如何配置IIS的详细信息吗?绑定设置如何?您是否在服务站点上启用了net.pipe作为启用的协议?我用一些相关的IIS配置(Q中间)进行了更新。据我所知,net.pipes已启用(正如在I中一样,它显示的内容与该问题中显示的内容相同)。当然,从工作的意义上说,它没有启用。MetaDataExchange配置可能有问题?感谢您共享此链接。这为我解决了问题。我们将主平台从Windows Server 2008 R2移动到Windows Server 2016,并遇到了此问题。2008 R2中的*绑定使用“localhost”时工作正常但在2016年,我必须显式绑定“localhost”
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="netNamedPipeBindingConfig" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport protectionLevel="EncryptAndSign" />
</security>
</binding>
</netNamedPipeBinding>
</bindings>
<services>
<service name="MyService">
<host>
<baseAddresses>
<add baseAddress="net.pipe://localhost/" />
</baseAddresses>
</host>
<endpoint
address="netNamedPipeBinding"
bindingConfiguration="netNamedPipeBindingConfig"
binding="netNamedPipeBinding"
contract="IMyService" >
</endpoint>
</service>
</services>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
</system.serviceModel>
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="NetNamedPipeBinding_IMyService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
transactionFlow="false" transferMode="Buffered" transactionProtocol="OleTransactions"
hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288"
maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<security mode="None">
<transport protectionLevel="EncryptAndSign" />
</security>
</binding>
</netNamedPipeBinding>
</bindings>
<client>
<endpoint
address="net.pipe://localhost/netNamedPipeBinding"
binding="netNamedPipeBinding"
bindingConfiguration="NetNamedPipeBinding_IMyService"
contract="MyService.IMyService"
name="NetNamedPipeBinding_IMyService">
</endpoint>
</client>
</system.serviceModel>