Question Locked

The request failed with HTTP status 401: Unauthorized.

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have an ASP.net page that shows a report made from MS SQL Server Reporting Services. My problem is, whenever I try to view the report an error always occurs.

Here is the error:

The request failed with HTTP status 401: Unauthorized.

I also noticed that whenever I go to my report manager (http://servername/reports), it always ask for a user name and password.

It seems like it's an issue regarding permissions in my report server but I'm not sure.

Thanks in advance!

5 replies

by deadly ernest

setting that requires an authentication of the user prior to reading the report. You need to have that authentication catered for in the report preparation or organise for the security requirement to be removed.

by jeffreyalejo

Thanks for the reply sir.

Here is my code of calling reports from the report server using asp.net

rvReport.ProcessingMode = ProcessingMode.Remote

Dim serverReport As ServerReport
serverReport = rvReport.ServerReport
serverReport.ReportServerUrl = New Uri("http://servername/reportserver")
serverReport.ReportPath = "/Reports/ReportFolder/MyReport"

MyReport is the rdf file stored in the report server. Can I insert a code around here that can resolve the issue?

by deadly ernest

so I don't know how to do what you require with that code. In a general sense I would suggest you'd need to either:

1. Insert the code to allow someone to log in to the server when they order the report, or

2. Create a new account on the server for the report, greatly limit what it has access to (probably just a list of reports if it can be so restricted) and include the code for it to automatically log in as part of the report request code.

Maybe someone with experience with that specific type of server and code will jump in with an answer for you. Try using the Post edit function to change the thread title to mention asp.net code help needed.

by jeffreyalejo

I'll try both of them. I'll talk to our Network Administrator regarding this matter.

Thank you for your time sir.

This discussion is closed to new replies.