java - 在 Java Web 应用程序中集成 SSRS 2016 报告需要帮助
问题描述
我们正在SQL Server
从迁移2008R2
到2016
. 我们使用exe
文件来访问SSRS
使用文件的报告ReportExecution2005.asmx?wsdl
。
迁移后,我们在尝试使用C#.net
程序读取报告时收到以下错误。
Unhandled Exception: System.InvalidOperationException: Client found response content type of 'text/html; charset=UTF-8', but expected 'text/xml'.
The request failed with the error message:
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
at getMaPSStartpage.ReportService2008.ReportExecutionService.LoadReport(String Report, String HistoryID)
at getMaPSStartpage.Program.Main(String[] args)
谢谢!!拉贾塞卡
解决方案
SSRS Web 服务正在返回一条错误消息,该错误采用 text/html 的形式。很可能是权限问题。但是,您可以使用 fiddler 来捕获整个 HTML 内容并查看确切的错误消息。
首先,尝试在浏览器中导航到 SSRS 报告服务 URL。通常是http://<reportservername>/reportserver
. 然后执行其中一份报告。如果成功,则可能是您的 C# 应用程序在特权较低的帐户下运行。
推荐阅读
- python - 如何从熊猫数据框中只选择几列
- assembly - 在汇编Linux中将浮点值打印到STDOUT
- python - LinearNDInterpolatorExtrapolate 用简单的例子返回错误
- java - 获取异常 java.lang.IllegalStateException: EntityManagerFactory is closed while trying to save secound istance
- c - 如何使用 libpcre2 在纯文本文件中搜索子字符串?
- php - 从 Kartik ExportMenu 小部件导出到 Excel 时,只有在双击它时才会显示换行符
- javascript - 每次登录时如何将url与变量连接起来
- java - 无法使用 Selenium Webdriver 在 Twitter 上的撰写新推文框中输入文本
- django - django 模型 - 避免数据库设计中可能的循环引用
- c - 为什么在这种情况下需要取消对 char 的引用?