我写了wcf服务 当我使用http绑定在IIS7上部署它时,一切正常。
我想使用netcp绑定在Windows Process Activation Services(WAS)上部署相同的内容。 当我尝试使用svcutil为服务创建代理时 我收到以下错误消息: 错误:无法从net.tcp:// localhost / myservice / servi获取元数据 ce.svc 如果这是您已加入的Windows(R)Communication Foundation服务 请检查您是否已在指定的addr处启用元数据发布 ESS。有关启用元数据发布的帮助,请参阅MSDN文档 离子http://go.microsoft.com/fwlink/?LinkId=65455。
WS-Metadata Exchange错误 URI:net.tcp://localhost/servicemodelsamples/service.svc 元数据包含无法解析的引用:'net.tcp:// localhost / servicemodelsamples / service.svc”。
这是web.config:
<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>
谢谢,
答案 0 :(得分:0)
on .net 4检查“Net.Tcp Listener Adapter”服务是否使用.net 4版本的SMSvcHost.exe(应该是...... \ v4.0.30319 \ SMSvcHost.exe) 如果没有.net 4的修复安装