locked
An exception of type 'System.Net.WebException' occurred in Microsoft.ReportViewer.Common.dll but was not handled in user code Additional information: The request failed with HTTP status 401: Unauthorized. RRS feed

  • Question

  • Hi all am getting below error in code of reportviewer

    An exception of type 'System.Net.WebException' occurred in Microsoft.ReportViewer.Common.dll but was not handled in user code
    Additional information: The request failed with HTTP status 401: Unauthorized.

      ReportViewer1.Visible = true;
            ReportViewer1.ShowCredentialPrompts = false;
            ReportViewer1.ShowParameterPrompts = false;
            ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
            ReportViewer1.ServerReport.ReportServerUrl = new System.Uri(REPORTSERVERNAME);
            ReportViewer1.ServerReport.ReportPath = "/abc/Account Summary Report";
            //ReportViewer1.ServerReport.ReportServerCredentials = new ReportServerCredentials(USERNAME, PASSWORD);
            ReportViewer1.ServerReport.SetParameters(parm);
    error occurs on this line 
     ReportViewer1.ServerReport.SetParameters(parm);
    Kindly help


    Wednesday, March 11, 2015 6:26 AM