Accessing SSRS 2008 report in Visual Studio 2010 web site RRS feed

  • Question

  • I have a report (.rdl) in SSRS 2008 on report server. I can access this report on the server as well as from my machine like http://servername/Reports.


    I want to access this report from a local website on my machine. I am using ReportViewer control for this. I have following code on my Default.aspx



     <asp:ScriptManager ID="ScriptManager1" runat="server">


     <rsweb:ReportViewer ID="ReportViewer1" runat="server">




    On Default.aspx.cs, I have following code-

    protected void Page_Load(object sender, EventArgs e)


    ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;

            ReportViewer1.ShowCredentialPrompts = true;

            ReportViewer1.ShowExportControls = true;

            ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerCredentials(ConfigurationManager.AppSettings["UserName"], ConfigurationManager.AppSettings["Password"], ConfigurationManager.AppSettings["SERVERNAME"]);

            ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://servername/Reports"); // Report Server URL

            ReportViewer1.ServerReport.ReportPath = "test"; // Report Name

            ReportViewer1.ShowPrintButton = true;



    Now when I run this site on browser as - http://localhost/TestReport/default.aspx, I get following error-

    The request failed with HTTP status 401: Unauthorized

    Tuesday, July 26, 2011 4:02 PM