WCF with netTCPBinding


Hi

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>
</

behaviors>

Thanks,
ram27Asked:
Who is Participating?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.