We are migrating SQL Server
from 2008R2
to 2016
. We used exe
file to access SSRS
reports using ReportExecution2005.asmx?wsdl
file.
After the migration we are getting the following error while trying to read the report using C#.net
program.
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)
Thanks!! Raja Sekhar
SSRS web service is returning an error message and that error is in the form of text/html. Most likely it's a permissions issue. However, you can use fiddler to capture the entire HTML contents and see the exact error message.
First, try navigating to the SSRS report service URL in a browser. Normally it's http://<reportservername>/reportserver
. Then execute one of the reports. If that's successful then it could be your C# application running under a less privileged account.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.