Answered by:
The request failed with HTTP status 401: Unauthorized

Question
-
Hi
I have deployed the SSRS with windows authentication (default) and it is working with Browser when I provide the server credentials.
But when I try to call the Reporting Service through ReportViewer Control , I'm getting below error-
The request failed with HTTP status 401: Unauthorized
I implemented the IReportServerCredentials as mentioned in below
https://msdn.microsoft.com/en-us/library/microsoft.reporting.webforms.ireportservercredentials.aspx
Every other sites it a same implementation but it is not working for me.
I'm using SSRS 2012 and using below code in ASP.NET web site
try
{
repViewer.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
repViewer.ServerReport.ReportServerUrl = new Uri("http://<Server Address/ReportServer");
repViewer.ServerReport.ReportPath = "/UserReports/MarketingReport";
repViewer.ServerReport.Refresh();
}
catch (Exception ex)
{
throw ex;
}
please help me.
-shreesh
- Edited by Shreesh Agarwal Wednesday, April 20, 2016 1:03 PM
Wednesday, April 20, 2016 12:57 PM
Answers
-
Hi Shreesh,
Could you please check the error logs, find out if they get the message "Login failed for User ‘NT Authority\Anonymous’".
If they do have this message, then it may be a double hop issue and need the usage of Kerberos.
For more details about Kerberos, you can refer to this:
If you still have question, please feel free to ask.
Thanks,
Xi Jin.
- Proposed as answer by Xi Jin Thursday, May 12, 2016 7:14 AM
- Marked as answer by Simon_HouMicrosoft contingent staff Saturday, May 14, 2016 8:53 AM
Thursday, May 5, 2016 7:05 AM
All replies
-
Hi Shreesh,
According to your description, your report runs well in report manager, but it gets an error when running with the report viewer control. Right?
Based on the error, it may be an asp.net application authentication error, you can add <identity impersonate = true /> within <system.web> tag in web.config file, then try to rerun your report. Or maybe the user is not authorized to the report services.
For more details, you can refer to the relevant threads:
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/6cc59972-2931-47e4-a72a-168be826d7f0/the-request-failed-with-http-status-401-unauthorized-report-viewer-vs2010-trying-to-open-a-report?forum=sqlreportingservices
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/47805c2f-f4c5-4a3d-b29d-0ac635252787/the-request-failed-with-http-status-401-unauthorized-reporting-service-reportviewer?forum=sqlreportingservicesIf you have any question, please feel free to ask.
Thanks,
Xi Jin.Thursday, April 21, 2016 8:21 AM -
Hi Xi,
I already tried <identity impersonate = true /> that is not working , User is authenticated because through browser I'm able to access by giving the same credentials.
I'm not able to find out what i'm missing.
Thanks
Shreesh
Thursday, April 21, 2016 1:18 PM -
Anybody please update if any information is available , I'm stuck .
My Reporting Services is hosted and working fine with browser with Domain Account but when we are calling in ReportViewer Control getting "401 unauthorized error"
Thanks
Shreesh
Wednesday, April 27, 2016 10:06 AM -
Hi Shreesh,
Could you please check the error logs, find out if they get the message "Login failed for User ‘NT Authority\Anonymous’".
If they do have this message, then it may be a double hop issue and need the usage of Kerberos.
For more details about Kerberos, you can refer to this:
If you still have question, please feel free to ask.
Thanks,
Xi Jin.
- Proposed as answer by Xi Jin Thursday, May 12, 2016 7:14 AM
- Marked as answer by Simon_HouMicrosoft contingent staff Saturday, May 14, 2016 8:53 AM
Thursday, May 5, 2016 7:05 AM