I have a WCF REST service for Self-Hosted (Console App) with the following binding:
- WebMessageEncodingBindingElement
- HttpsTransportBindingElement (ManualAddressing = true, KeepAliveEnabled = true, AllowCookies = false, HostNameComparisonMode = Exact)
This is displayed at the HTTPS URL (" https: // mylaptop / myendpoint ")
I have a self-signed certificate issued by "mylaptop" that I assign using myServiceHost.Credentials.ServiceCertificate.SetCertificate. The certificate was successfully added, and ServiceHost opens successfully (with no exceptions). If I find "netsh http show servicestate", I see that there was a successful registration in https: // mylaptop / myendpoint with HTTP.SYS
However, when I issue the GET to the endpoint, this does not work. It seems that the socket is discarded even before receiving a valid HTTP response. (FireFox says that βthe connection to the server was reset,β IE says that βit is not possible to display the web pageβ, and if I make a request through Fiddler, it says βthe connection was forcibly closed by the remote hostβ).
Everything works fine when I use HTTP instead of HTTPS.
Any idea what could be wrong with HTTPS?
source share