WCF with netTCPBinding
I have written wcf service everything works fine when i deploy it on IIS7 with http binding.
I want to deploy the same on Windows Process Activation Services (WAS) using netcp binding. when i try to create proxy for the service using svcutil i am getting below error message: Error: Cannot obtain Metadata from net.tcp://localhost/myservice/servi ce.svc If this is a Windows (R) Communication Foundation service to which you have acce ss, please check that you have enabled metadata publishing at the specified addr ess. For help enabling metadata publishing, please refer to the MSDN documentat ion at http://go.microsoft.com/fwlink/?LinkId=65455.
WS-Metadata Exchange Error URI: net.tcp://localhost/servicemodelsamples/service.svc Metadata contains a reference that cannot be resolved: 'net.tcp://localhost/ servicemodelsamples/service.svc'.
here is 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>
&l开发者_JAVA技巧t;/behaviors>
Thanks,
on .net 4 check if "Net.Tcp Listener Adapter" service is using .net 4 version of SMSvcHost.exe (should be ...\v4.0.30319\SMSvcHost.exe) If not repair installation of .net 4
精彩评论