views:

228

answers:

2

This article from Microsoft details how to implement transport security with an anonymous client.

http://msdn.microsoft.com/en-us/library/ms729789.aspx

I'd like to know if it is possible to achieve the same goal, using netTcpBinding instead of WsHttpBinding and hosting the service as a Windows Service.

A: 

I've never done it, but can't you just set the Client Authentication to None?

James L
+1  A: 

Yes, I don't see any reason why this wouldn't work over netTcp Binding. By default, netTcp is using transport level security already, but also Windows credentials. Just turn those off, and you should be good to go.

   <bindings>
      <netTcpBinding>
        <binding name="SecureNetTcp">
          <security mode="Transport">
            <transport clientCredentialType="None" />
          </security>
        </binding>
      </netTcpBinding>
    </bindings>

Marc

marc_s
To do this do I need to use a certificate for the service? When I try to start the service I get this error.Service cannot be started. System.InvalidOperationException: The service certificate is not provided. Specify a service certificate in ServiceCredentials.
80bower
As the MSDN article you referenced shows, yes, you need an SSL certificate on the server in order to use the transport-level security.
marc_s