I have a self hosted service, it includes an endpoint that uses NetTcpBinding with message level security (Basic128).
This service can be successfully added and accessed from a client located in the same machine
But if I build a client in a remote machine (over the local network), I can successfully add the service reference, but when I try to run it, I get a SecurityNegotiationException saying that "The caller was not authenticated by the service"
What could It be?
This is the Service model of the service:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="metadataSupport">
<serviceMetadata />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<netTcpBinding>
<binding name="ProductsServiceTcpBindingConfig">
<security mode="Message">
<message algorithmSuite="Basic128" />
</security>
</binding>
</netTcpBinding>
</bindings>
<services>
<service behaviorConfiguration="metadataSupport" name="Products.ProductsServiceImpl">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="ProductsServiceTcpBindingConfig"
name="NetTcp_IProductsService" contract="Products.IProductsService" />
<endpoint address="mex" binding="mexTcpBinding" name="MetaDataTcpEndpoint"
contract="IMetadataExchange" />
<host>
<baseAddresses>
<add baseAddress="net.tcp://localhost:8080/Service" />
</baseAddresses>
</host>
</service>
</services>
</system.serviceModel>
And this the Service Model of the remote client
<system.serviceModel>
<bindings>
<netTcpBinding>
<binding name="NetTcp_IProductsService">
<security mode="Message">
<message algorithmSuite="Basic128" />
</security>
</binding>
</netTcpBinding>
</bindings>
<client>
<endpoint address="net.tcp://RemoteServer:8080/Service" binding="netTcpBinding"
bindingConfiguration="NetTcp_IProductsService" contract="ProductsService.IProductsService"
name="NetTcp_IProductsService">
<identity>
<userPrincipalName value="RemoteServer\Rafael" />
</identity>
</endpoint>
</client>
</system.serviceModel>