none
The request failed with HTTP status 401: Unauthorized. (Reporting Service ReportViewer) RRS feed

  • Question

  • Hi Experts,

    After struggling for  two days and tried all the thisngs found by googling i am fedup of the problem so i am posting it here. The problem is as

    I have SQL Server 2008 RS2 installed Windows Server 2008 by using local administrator and i selected the option install and configure Reporting Services while installing the SQL Server. i can open the report from both http://ServerIP/ReportServer/ and http://ServerIP/Reports/Pages/Folder.aspx and can also view the report. But the problem is that when i try to open the report from an asp page using report viewer i am having the exception "The request failed with HTTP status 401: Unauthorized". I cant figure it out what is the problem. I would also like to mention that my reporting server and the database server are not on the same machine.

    I tried to give full rights to the folder ReportServices under SQL Server folder in Program Files. but to success. secondly i also tried by putting the reporting server and the database server on same machine but no sucess. i also tried by closing the firewall and failed again.

    Can anyone help me to solve this problem i will be thankful.

     


    A Learner
    • Edited by Hunain Durrani Tuesday, September 27, 2011 2:44 PM spelling mistake
    Tuesday, September 27, 2011 2:44 PM

Answers

  • Hi Hunain,

    Thanks for your post.

    Based on the information you provided, it should be a asp.net application authentication error,you can add  <identity impersonate = true /> within <system.web> tag in web.config file, and then have a try. Moreover, if you want to access you web appliation from a remote web server, you have to grant Browser permission to the web server account at he item-level security of the report in report manager home page.

    More information about How to implement impersonation in an ASP.NET application, please refer to the KB link below: http://support.microsoft.com/kb/306158

    Thanks,
    Bill Lu

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, September 29, 2011 2:48 AM
    Moderator

All replies

  • Hi Hunain,

    Thanks for your post.

    Based on the information you provided, it should be a asp.net application authentication error,you can add  <identity impersonate = true /> within <system.web> tag in web.config file, and then have a try. Moreover, if you want to access you web appliation from a remote web server, you have to grant Browser permission to the web server account at he item-level security of the report in report manager home page.

    More information about How to implement impersonation in an ASP.NET application, please refer to the KB link below: http://support.microsoft.com/kb/306158

    Thanks,
    Bill Lu

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, September 29, 2011 2:48 AM
    Moderator


  • I had a similar situation as Hunain.  A ReportViewer control in an asp.net application getting this error when connecting to a remote reporting server:
    The request failed with HTTP status 401: Unauthorized.

    The report uses the credentials stored on the reporting server in the datasource, these credentials are for a local SQL Server account that has db_owner permission for both the database that contains the report's data and the ReportServer database.

    The solution given by Zilong of adding <identity impersonate = "true"/> within the <system.web> tag in the web.config file works and I don't get the error anymore.

    What I don't understand is how impersonation is working in this situation, and why in our test environment, where we have the same setup, it works without the enabled impersonation?  can this be enabled elsewhere other than the web.config file?

    Does it have anything to do with the version of Windows/IIS?

    Test Environment: WebServer is Win Server 2003 Standard (IIS6), DbServer is SQL Server 2008 on Win Server 2003 x64

    Production: WebServer is Win Server 2003 Standard (IIS6), DbServer is SQL Server 2008 on Win Server 2008 x64


    Saturday, August 18, 2012 2:01 PM
  • In Which Web Config file I need to put this tag and in which server.

    database server from where i am getting data for reporting.

    or 

    and server where i am making report.

    Thursday, November 14, 2019 11:16 AM