Click here to Skip to main content
15,889,808 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Friends,
I am using VS 2013,SQL 2012 EXPRESS EDITION WITH ADVANCES SERVICES.
I am using SSRS reports.we have two servers.Application server contains published website files.Another server contains Database and SSRS reports.I couldn't access ssrs report from application.How to access it?

I have tried and i am getting error "The request failed with HTTP status 401: Unauthorized."

C#
report viewer 

 rptViewer.ProcessingMode = ProcessingMode.Remote; 
rptViewer.ServerReport.ReportServerUrl = new Uri(ConfigurationManager.AppSettings.Get("ReportServerUrl")); 
   string strReportLayout = Convert.ToString(s1["strReportLayout"]);
            rptViewer.ServerReport.ReportPath = ConfigurationManager.AppSettings.Get("ReportServerProject") + "/"+strReportLayout; //Passing the Report Path   
           IReportServerCredentials irsc = new CustomReportCredentials("sqldbusername", "sqldbpwd", "serverIP");


What I have tried:

web config file

<authentication mode="Windows"/>
<identity impersonate="true" />
<add key="ReportServerUrl" value="http://202.66.132.185:80/ReportServer" />

<add key="ReportServerProject" value="/RPTSSRS"/>
Posted
Updated 2-Mar-17 18:17pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900