0
votes

I have a web role configured with SSL, which has a ReportViewer control that renders a report hosted in Azure Reporting Services.

When I load the page with the ReportViewer I get the error:

The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.

What is going on?

1

1 Answers

0
votes

This did the trick. I put this code in my _Load event in the page that has the report viewer:

ServicePointManager.ServerCertificateValidationCallback += new RemoteCertificateValidationCallback(BypassSslCertificateValidation);


private static bool BypassSslCertificateValidation(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors error)
{
   return true; //add your validation logic here
}