I\'m trying to make a request via SSL. The certificate is already installed on the machine and it works via browser.
I am using this request:
System.Text
This is client code, right? And you're accessing an HTTPS url, aren't you? I think the problem is with the server certificate, which the client-side TLS stack cannot validate. When you connect to that URL via browser, does it work smoothly or do you see a warning on certificate mismatch?
Make sure your certificate is properly trusted. Has the root certificate been added to the correct certificate store (Trusted Root CA's on Local Machine)?
I encountered this error when the (own made) root certificate for a (self signed) certificate had been added to the Trusted Root CA's for Current User). Moving the root cert to the Root CA store on Local Machine solved my issue.
I solved the problem with this:
ServicePointManager.ServerCertificateValidationCallback = new
RemoteCertificateValidationCallback
(
delegate { return true; }
);