简体   繁体   中英

Visual Studio Report Viewer does not connect to remote SSRS server

So i have setup SSRS 2014 on a test server and i have added 1 test report in the HOME folder. The report runs with out any problems. I can even connect to the report dashboard from my local machine by using the the IP Address xxx.xxx.xx.xx/Report_Server and run the report no issue.

The problem i am having is that in visual studio i have added the report viewer control onto an .aspx page but as soon as i make a call to the report server i get the following exception.

Message = "The attempt to connect to the report server failed. Check your connection information and that the report server is a compatible version."

InnerException = {"The request failed with HTTP status 404: Not Found."}

the code i am using to connect to the server is as follows

rvReport.ServerReport.ReportServerUrl = new Uri("http://xxx.xxx.xxx.xx/Report_Server");
rvReport.ServerReport.ReportServerCredentials = new ReportServerCredentials("Username", "Password", "Domain ???");
rvReport.ServerReport.ReportPath = "TestReport";

Something that i would like to mention is that for this test i am using the Servers administration account and password to connect to the reporting server and these credentials work if i navigate to the report dashboard URL from my local machine.

What exactly would the domain name be in the ReportServerCredentials ? i have tried the IP address, the name of the server, the SQL instance name practically everything i can think of.

I have opened tcp ports 1433 and udp 1434 and allowed remote connections the db.

Is there another port that needs opening?

I have tried a ReportPath = "/TestReport".

I have also allowed http headers to localhost within the SSRS Config Manager.

I'm just at a loss right now.

Sigh, i found the problem. To connect to the report server dashboard via the internet you use the the IP xxx.xxx.xx.xxx/Report_Server which is the link found in the SSRS Config manager > Report Manager URL Page which is also the URL i was using in my code. i switched the URL in my code to match the URL found in the SSRS Config Manager > Web Service URL Tab and used my Servers Computer name as the DomainName and everything is loading correctly now in the Visual studio report viewer.

SSRS Config Manager Screenshot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM