Link to home
Start Free TrialLog in
Avatar of coecho
coecho

asked on

Access Denied When Rendering a Report Using System.Net.CredentailCache.DefaultCredentials

When I render a report on my local mahcine using the following code - it works correctly and the report is rendered - but with the same code - I'm getting an "401 - Access Denied" on another machine.  What would affet the "System.Net.CredentialCache.DefaultCredentials" so that it worked correctly in one instance but not in another?  

ReportingServices2005.ServerReportOutput output =  new .ReportingServices2005.ServerReportOutput();
 
string reporttype = Request.QueryString["Document"];
string reportname = "ReportName";
       
 output.ReportParameters.Add("ReviewID",Request.QueryString["ReviewID"]);
 output.ReportExecutionUrl = System.Configuration.ConfigurationManager.AppSettings["ReportServer"];
       
output.ReportExecutionCredentials = System.Net.CredentialCache.DefaultCredentials;
output.ReportPath = reportname;
output.OutputType = InfinityIncremented.ReportingServices2005.OutputType.AdobePDF;

thanks in advance for any help with this.
SOLUTION
Avatar of Agarici
Agarici
Flag of Romania image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial