I have a WCF service hosted on IIS7. This service is called both from a Silverlight client and from a C# Windows service. At the moment everything is running on the same machine. It uses a self-signed certificate, with an authority .cer file which I imported into the trusted root using certmgr.msc
The Silverlight app can call the service just fine, but when the Windows Service tries to call it, I get the following exception:
System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust
relationship for the SSL/TLS secure channel with authority 'localhost'. --->
System.Net.WebException: The underlying connection was closed: Could not establish
trust relationship for the SSL/TLS secure channel. --->
System.Security.Authentication.AuthenticationException: The remote certificate is
invalid according to the validation procedure.
What are the reasons that the Windows service would be denied access while the browser and Silverlight app can access the service over https? Is it maybe because the client certificates thumbprint must be tied to the windows service or something?
(I'm kind of new to the workings of SSL authentication as you can see).
Thanks