具有netTCPBinding的WCF
我已经写了wcf服务 当我使用http绑定将它部署到IIS7上时,一切都正常 我想使用netcp绑定在Windows Process Activation Services(WAS)上部署相同的应用程序。 当我尝试使用svcutil为服务创建代理时 我收到以下错误消息: 错误:无法从网络获取元数据。tcp://localhost/myservice/servi ce.svc 如果这是一个Windows(R)通信基础服务,您有ACCE ss,请检查您是否已在指定的地址启用元数据发布 字母S。有关启用元数据发布的帮助,请参阅MSDN文档 离子在 WS元数据交换错误 URI:net。tcp://localhost/servicemodelsamples/service.svc 元数据包含无法解析的引用:'net。tcp://localhost/ servicemodelsamples/service.svc' 以下是web.config:具有netTCPBinding的WCF,wcf,nettcpbinding,Wcf,Nettcpbinding,我已经写了wcf服务 当我使用http绑定将它部署到IIS7上时,一切都正常 我想使用netcp绑定在Windows Process Activation Services(WAS)上部署相同的应用程序。 当我尝试使用svcutil为服务创建代理时 我收到以下错误消息: 错误:无法从网络获取元数据。tcp://localhost/myservice/servi ce.svc 如果这是一个Windows(R)通信基础服务,您有ACCE ss,请检查您是否已在指定的地址启用元数据发布 字母S。有关启
<system.serviceModel>
<services>
<service name="MyProj.Myservice"behaviorConfiguration="CalculatorServiceBehavior">
<!--This endpoint is exposed at the base address provided by host: net.tcp://localhost/servicemodelsamples/service.svc -->
<endpoint binding="netTcpBinding" bindingConfiguration="PortSharingBinding"contract="MyProj.ICalculator" />
<!--the mex endpoint is explosed at net.tcp://localhost/servicemodelsamples/service.svc/mex -->
<endpoint address="mex"binding="mexTcpBinding"contract="IMetadataExchange" />
</service>
</services>
<bindings>
<netTcpBinding>
<binding name="PortSharingBinding" portSharingEnabled="true">
<security mode="None" />
</binding>
</netTcpBinding>
</bindings>
<!--For debugging purposes set the includeExceptionDetailInFaults attribute to true-->
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehavior">
<serviceMetadata />
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
谢谢,在.net 4上检查“net.Tcp侦听器适配器”服务是否使用.net 4版本的SMSvcHost.exe(应该是…\v4.0.30319\SMSvcHost.exe)
如果不修复.net 4的安装您似乎正在使用
localhost
作为绑定到的服务地址-您可以尝试使用计算机名或IP地址吗?这有什么区别吗??