SSRS/.Net – SSRS not working locally on server. ASP.Net’s ReportExecutionService or ReportViewer breaking with “HTTP 404” error while accessing SSRS URL
Hello all. In this post I’m
picking up an interesting problem related to SSRS, which was a result of a
small miss in SSRS configuration and can keep novice DBAs wondering for long,
what has went wrong (Hey does it rhymed!!).
As we know .Net Framework
provides easy and extensive integration of technologies and SSRS is no
exception to it. There are multiple ways in .Net through which SSRS reports can
be directly used within the application like using “Report Viewer” component, which
is simpler to implement and use. Other ways is using more complex (means needs
more coding) is “Report Execution Service”. In both the cases the SSRS report
server URL should be accessible to application.
Problem
Our DEV team was working on one
such integration using the “Report Execution Service” method, so one of our
DBAs installed and configured SSRS components and provided the respective URLs
to the team to use after providing appropriate rights to folders. Team was
successfully able to deploy and test the SSRS report but it was not working
when being used in .net application. The application page was crashing with
below error.
As we were not getting any
clear error I logged into the server and browse the application locally but it
was failing with same error, so I checked “windows event viewer” logs and found
warning for that page. The page was actually crashing with “HTTP 404” errors as
can been seen below.
To ensure I tried accessing the SSRS
URL locally on the server and got the same error while accessing it. However,
the interesting part here was that the URL was working fine if you access it
remotely and that’s why DEV team was able to deploy their reports.
Solution
The problem here (as I stated in
start) was SSRS configuration. When I checked the SSRS URL configuration, I saw
that the URL was configured with server’s IP address as can be seen below.
The reason for SSRS URL to be
working remotely because when we ping server name from a remote machine it goes
to DNS server, which gives us the corresponding IP and that is used to access
the server. Same applies for URL requests using the server name. However, on
local machine the server name may not necessarily resolves to DNS IP only. It has
various options like resolving to IPv6 address (if it is enabled on network
card, doesn’t matter your network infra is using it), or can resolve to “::1”
etc. which will cause the URL requests to fail if using the specific IP based
configuration.
To resolve this problem we have
to use correct settings so that SSRS URL is not bound to specific IP only. The
steps are as follow:
2. Go to “Web Service URL” tab. There click on the “IP Address” drop down list.
3. Select “All assigned” option and
click on apply.
4. Once selected you’ll see new URL has been registered with server name.
5. Similarly we have to correct setting for Report Manager as well.
6. For this we need to go to “Report Manager” tab and click on “Advanced” button.
7. There select the IP address and click on “Edit”.
8. Here as well, we will pick “All assigned” from the “IP address” drop down and click “Ok” button. Click “Ok” on the previous dialog box as well.
9. Once done you’ll see that Report Manager URL has also been corrected and you can exit the configuration wizard.
10. Now when we access the URL locally it is working as it should.
Note: As this is a DEV box we had
the Application and SSRS hosted on same machine else it would have been less
trouble. But I would recommend to go with above settings as this is the
recommended settings unless specifically required.
As always, please don’t forget to
share the post and leave your valued feedbacks.
Comments
Post a Comment