views:

210

answers:

2

Hello, I am using the ReportViewer control and periodically I get the following error:

"Error encountered displaying report. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.

Inner Exception: The remote certificate is invalid according to the validation procedure."

I've been able to temporarily fix the issue by modifying my web.config file (essentially just placing a space somewhere in the file). Of course, this will only fix it temporarily until the underlying issue rears its ugly head again.

Since I'm updating the web.config file when this issue occurs, the recycling of the webpage is occuring which then enables the ReportViewer to start functioning once again.

Looking for a way to fix it permanetly so that I will not have to update the web.config file manually.

Has anyone experienced this particular issue with the ReportViewer control? Does anyone have a viable solution for it?

Thanks, Rusty

A: 

We use the report viewer in an SSL environment and it works great. Could that be more of a server error with the certificate as the exception seems to suggest?

Brian
A: 

I found the same error message in my log files and it was being caused just by trying to view a report in the browser.

Some things to check from this forum post: Could not establish trust relationship for the SSL-TLS secure channel.

Check the SSL Certificate (steps for viewing certificates are listed below):
· The value in Issued To is what you need to provide in the URL. If Issue To is "machine.domain.com" then typing http://localhost... in the browser will fail. Instead try https://...
· Intended Purposes must include Server Authentication
· Ensure the SSL Certificate is issued by a certificate authority recognized by your Domain Controller. Otherwise Report Manager will fail to connect to Report Server. Self signed certificates do not work.

In Reporting Services Configuration Manager:
· Ensure a SSL URL is reserved and that a valid certificate is selected
· Ensure the IP address selected for the certificate binding is correct

In rsreportserver.config:
· Set HostName property to the value of IssuedTo, or
· Set ReportServerURL explicitly
· To disable SSL by default set SecureConnectionLevel to 0

To see the certificates your using:
· use mmc (Start --> run --> mmc --> enter)
· Add the Certificates Add in (File --> Add/Remove Snap-in --> Add... --> Certificates)
· Select Computer Account (Next --> Finish --> Close --> OK)
· Under Console Root look at the "Personal" certificates. If you're using a command line tool instead, the certificates are in the "MY" store.
· Expand Certificates (Local Computer), Expand Personal, Click on Certificates
· SSL can use any certificate in this store where the Intended Purposes list contains "Server Authentication"

The SSRS 2008 server I am using has multiple certificates and domain names. I eventually fixed mine by explicitly setting ReportServerURL. From MS: How to: Configure Report Manager

Bratch