MessageSecurityException when security mode is on

Hi,

I have a very simple client/server testing program using net.tcp, everything is working fine until I set the security mode (i.e. <security mode="Message"). Once I enabled the security setting I got the following error on the client side (server running on a different machine):

Unhandled Exception: System.ServiceModel.Security.MessageSecurityException: Identity check failed for outgoing message. The expected DNS identity of the remote endpoint was '172.16.2.2' but the remote endpoint provided DNS claim 'localhost'. If this is a legitimate remote endpoint, you can fix the problem by explicitly specifying DNS identity 'localhost' as the Identity property of EndpointAddress when creating channel proxy.

Would this be related to the UPN and SPN settings? I did play around with the UPN and SPN settings, but no luck at all.

I am using RC1 on XP Pro (client and server are running on different machines with different login).

Any help will be much appreciated. Thanks in advance.
W Wong

[1075 byte] By [WWong] at [2007-12-24]
# 1

Are you using a server certificate called localhost? If so then you can set your <identity> on the client to dns = localhost.

Thanks!

Scott

ScottMason-MSFT at 2007-10-8 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...
# 2

And how to do that is:

<endpoint ...>

<identity>

<dns value="localhost" />

</identity>

</endpoint>

MicheleLerouxBustamante at 2007-10-8 > top of Msdn Tech,Visual Studio Orcas,Windows Communication Foundation (Indigo)...

Visual Studio Orcas

Site Classified