Search code examples
c#web-servicesreporting-servicessql-server-2012ssrs-2012

SQL Server 2012 SSRS C# Web Service Error


I was using SQL Server 2008R2 with SSRS. In my c# project and based on examples from Microsoft's website I was able to output a PDF report. I switched to SQL Server 2012, setup the web service all over again with the same endpoint http://localhost/ReportServer/reportexecution2005.asmx?wsdl. I made sure SSRS for the 2008R2 wasn't running and that the 2012 was.

The error I'm receiving in my project during debug is:

System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: 
http://schemas.microsoft.com/sqlserver/2005/06/30/reporting/reportingservices/LoadReport. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at 
System.Web.Services.Protocols.SoapServerProtocol.Initialize() at 
System.Web.Services.Protocols.ServerProtocol.SetContext(Type type, HttpContext context, HttpRequest request, HttpResponse response) at 
System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing)

Solution

  • You need to update the web reference in the c# project itself. This is a context menu item as shown below:

    context menu The error shows a mismatch in the web service definition, thus you can not use the web references generated for SQL server 2008.