Access Denied When Rendering a Report Using System.Net.CredentailCache.DefaultCredentials
Posted on 2009-05-19
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.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.