Search code examples
wcfwcf-client

WCF service in windows process activation service (WAS)


I was reading WCF .NET 4 faq. I'm not sure with the answer for the following question. Q: A wcf client is needed for the WCF service hosted within WAS. The service is configured as below:

<service name="abc">
<endpoint binding="netTcpBinding" contract="IMainService">
</service>

The service is located at the URL http://servername/wcfservice/abc.svc Which config settings should be added to system.serviceModel/client element?

A:

<endpoint binding="netTcpBinding" contract="IMainService" address="net.tcp://servername/wcfservice/abc.svc"

Shouldn't the address in the client section start with http? or the service should be exposed with net.tcp? Or the binding in the service should be http? I need input from community. What do you guys think?


Solution

  • No the answer is correct. The server endpoint says it's a netTcpBinding so the client has to use a 'net.tcp://...' addess.

    It does seems a little confusing. I presume that when they say 'The service is located at the URL http://...' they are referring to the metadata, which is typically published over http, even though the service itself is exposed via net.tcp. It could also be a typo.