Search code examples
wcfnettcpbinding

NetTcpBinding wcf service with remote access AND transport security?


I am struggling with a WCF issue relating to name resolution-or something like so. When I consume a wcf service (netTcpBinding) on an application server via a web application on the web server it doesn't work. Ok it doesn't work in most situations. If you access the web application from the web server itself using localhost or 127.0.0.1 it works. However accessing it through the web server via another client machine or accessing the web application locally on the web server using the host name or IP address does not work. In both instances you get a socket connection aborted error.

What makes it more interesting is that switching all the security to 'none' as opposed to 'transport' resolves the issue.

My question is, is it possible to access wcf services using your web server and still use transport security? Or is this a bug/designed behaviour?

Many thanks for any insight, Steve


Solution

    1. The default NetTcpBinding security option is Kerberos / Windows Authentication. If your client and service are not on the same domain it will not work. You may need to look at certificate based authentication.

    2. If you your service is running under a domain account, try changing it to LocalService or NetworkService to see if it resolves the issue.