System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction:

asp.net, c#, exception, soap, web-services

Solution

In addition to removing and adding web-reference, you could try regenerating proxies using wsdl.exe as suggested here, with the namespace again. Hope it helps

Problem

An exception flows when I was trying to call a method on web service: ``` System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: http://localhost:53460/3Development/MyWebService.asmx/GetBasePath. at System.Web.Services.Protocols.Soap11ServerProtocolHelper.RouteRequest() at System.Web.Services.Protocols.SoapServerProtocol.RouteRequest(SoapServerMessage message) at System.Web.Services.Protocols.SoapServerProtocol.Initialize() at System.Web.Services.Protocols.ServerProtocolFactory.Create(Type type, HttpContext context, HttpRequest request, HttpResponse response, Boolean& abortProcessing) ``` The web service's namespace: ``` [WebService(Namespace = "http://internaltest.temp.us/MyWebService.asmx")] ``` I did some research and found out that this exception flows because the web service's namespace referenced in the project was different from the server web service's namespace, but I've tried removing web reference and add it again in the project, but the result was still the same. My situation was similar to the below article: http://bluebones.net/2003/07/server-did-not-recognize-http-header-soapaction/ From Article: So basically the web service was moved from http://foo.com/servicename to http://bar.com/servicename but the “namespace” of the web service stayed as http://foo.com/servicename because no one changed it. The problem is: How to change the namespace of the web reference?

Original source

Related problems