WCF / wsHttpBinding / Digital Signature Corruption (!!)
am 28.09.2007 22:59:44 von Chris MullinsI've got a WCF Service hosted in IIS running on a Win2k3 machine. The
service is built with Beta 2 of Orcas.
The service is configured for Message Security, using the UserNameToken
provider. Users are authenticated using the ASP.Net Membership provider, and
authorized using the ASP.NET role provider.
The server has a self-signed certificate installed and properly configured.
The Service is configured to find this cert, and all of that seems to be
working fine.
All appropiate permissions have been given to the private key file, the
client configs are configured to not do trust chain validation, and such.
This service, when hosted on Windows XP running IIS5 works great.
When a client hits the Service running on the Win2k3 machine, I get an
authentication error back. The client sees, "The caller was not
authenticated by the service.", with a callstack of:
System.ServiceModel.Security.SecurityNegotiationException: The caller was
not authenticated by the service.
---> System.ServiceModel.FaultException: The request for security token
could not be satisfied because authentication failed.
[Rest of callstack snipped]
When I turn on tracing in the Server to try to track this down, I see very
unexpected cause:
System.ComponentModel.Win32Exception: The message or signature supplied for
verification has been altered
at System.ServiceModel.Security.TlsSspiNegotiation.GetOutgoingB lob(Byte[]
incomingBlob)
This error cascades up, causes the authentication to fail (resulting in the
client error), and makes the Service completly unusable.
If I disable all security (
wsHttpBinding, then things work better, but this isn't a usable
configuration.
I'm not really sure where to go next, in terms of debugging. The fact that
signature validation is failing is really throwing me for a loop. The fact
that it works on 2 seperate Windows XP machines is really confusing me...
Any suggestions?
The relevant configuration setions are shown below. I've changed some names
in pasting it in to protect the names of the innocent...:
[Server config]
membershipProviderName="SqlMembershipProvider"/>
x509FindType="FindByThumbprint"
findValue="Actual Thumbprint" />
contract="MyInterfaces.IRealInterface"/>
--
Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
http://www.coversant.com/blogs/cmullins