calling a ssrs webservice fails with following error
i tried to call a reporting web service... it used to work fine until my DBA changed some stuff...error is Error: 0x1 at Call SSRS Report: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: The request failed with HTTP status 401: Unauthorized. at ST_760b429ccd68456f9165329ea5ea86ef.csproj.ScriptMain.Main() the code i have in my Script task is RS2005.ReportingService2005 rs; RE2005.ReportExecutionService rsExec; // Create a new proxy to the web service rs = new RS2005.ReportingService2005(); rsExec = new RE2005.ReportExecutionService(); // Authenticate to the Web service using Windows credentials rs.Credentials = System.Net.CredentialCache.DefaultCredentials; rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials; rs.Url = (string)Dts.Variables["ReportWebServerService"].Value;//"http://wsvwimr001t/reportserver/reportservice2005.asmx"; rsExec.Url = (string)Dts.Variables["ReportWebServerExecution"].Value; //"http://wsvwimr001t/reportserver/reportexecution2005.asmx"; any thoughts?? 
May 22nd, 2012 11:51am

Have you tried explicitly creating the network credentials with a username/password? RS2005.ReportingService2005 rs; RE2005.ReportExecutionService rsExec; // Create a new proxy to the web service rs = new RS2005.ReportingService2005(); rsExec = new RE2005.ReportExecutionService(); // Authenticate to the Web service using Windows credentials rs.Credentials = new NetworkCredential(User, Pwd); rsExec.Credentials = System.Net.CredentialCache.DefaultCredentials; rs.Url = (string)Dts.Variables["ReportWebServerService"].Value;//"http://wsvwimr001t/reportserver/reportservice2005.asmx"; rsExec.Url = (string)Dts.Variables["ReportWebServerExecution"].Value; //"http://wsvwimr001t/reportserver/reportexecution2005.asmx"; Chuck
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 11:55am

no i haven't tried ..how do i do that?
May 22nd, 2012 1:23pm

no i haven't tried ..how do i do that? Exactly like the code I posted ;) rs.Credentials = new NetworkCredential(User, Pwd); Subsitute a UserID and password or variable for User and PWD aboveChuck
Free Windows Admin Tool Kit Click here and download it now
May 22nd, 2012 1:40pm

no i haven't tried ..how do i do that? Exactly like the code I posted ;) rs.Credentials = new NetworkCredential(User, Pwd); Subsitute a UserID and password or variable for User and PWD aboveChuck
May 22nd, 2012 1:43pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics