I have WCF service hosted on local IIS with self signed certificate, which is used for testing and Windows service and Windows application that connects to that WCF service and send some data.
Both Windows application and Windows service uses same dll to connect to WCF service but windows service fails with:
System.ServiceModel.Security.SecurityNegotiationException: Could not establish trust relationship for the SSL/TLS secure channel with authority 'local-domain'. ---> 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.
Windows service account is set to LocalSystem, could this be possible reason for this? If so, under which account should I run windows service?