我有一个Azure Reporting Services实例要通过报告执行Web服务连接到。我参考了this article进行连接。不过,我收到一个错误......Azure报告服务 - rsAuthenticationExtensionError
服务的网址是:
i593ehr-i.reporting.windows.net
我连接到:
i593ehr-i.reporting.windows.net/ReportServer/ReportExecution2005.asmx
和下载的WSDL文件。应该注意的是,使用的文档ReportExecution2010.asmx
,但没有直接指向WSDL文件...我使用文件中提供的命令来生成代理类。然后我用这个代码连接:
var service = new ReportExecutionService();
service.CookieContainer = new CookieContainer();
service.Credentials = new NetworkCredential("report", "******", "i593ehr-i.reporting.windows.net");
service.LoadReport2(reportPath, null);
string extension;
string mimeType;
string encoding;
Warning[] warnings;
string[] streamIds;
var reportData = service.Render("PDF", null, out extension, out mimeType, out encoding, out warnings, out streamIds);
File.WriteAllBytes(outputFile, reportData);
和它的返回消息:
The Authentication Extension threw an unexpected exception or returned a value that is not valid: identity==null. (rsAuthenticationExtensionError)
我在做什么错?