Reputation: 1859
My ASP.NET Application and SSRS reports are on different servers. I could be able to show the reports to ReportViewer control.
But, When I try to export the report, It redirects to a Page, and shows the below error.
The remote server returned an error: (401) Unauthorized.
This is the code assigning ReportViewer.
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://rpt-srv-01/ReportServer");
ReportViewer1.ServerReport.ReportPath = "/MyReports/Quotes_Invoices/ClientInvoicePrint";
ReportViewer1.ServerReport.Refresh();
Upvotes: 1
Views: 837
Reputation: 4898
I think it should be like this ..
ReportViewer1.ProcessingMode = Microsoft.Reporting.WebForms.ProcessingMode.Remote;
ReportViewer1.ServerReport.ReportServerUrl = new Uri("http://rpt-srv-01/ReportServer");
ReportViewer1.ServerReport.ReportPath = "http://rpt-srv-01/ReportServer/MyReports/Quotes_Invoices/ClientInvoicePrint";
ReportViewer1.ServerReport.Refresh();
Upvotes: 1