The soapaction HTTP request header is used to identify the destination of a soap HTTP request. Its value is a URI address. Soap sending does not limit the format, Uri features, or it must be parsed. In this case, when sending an http soap request, its HTTP client must use/to specify the soapaction HTTP request header.
The content of the soapaction header can be used on the server, for example, the firewall filters HTTP-based SOAP request messages. The soapaction header value is an empty string (""), indicating that the SOAP Message destination is identified by the HTTP request URI. If there is no value, it indicates that the Message destination is not specified.
Cross-platform Web service call: "The server fails to identify the value of the HTTP header soapaction" solution:
Symptom 1:
Web Service + ASP. NET ApplicationsProgramDeploy to the default server directory, and use HTTP in IE: // <server address>/<program Directory Name>/<default startup page Name> the error "the server fails to recognize the value of the HTTP header soapaction" occurs.
Symptom 2:
When you call the. NET web service on the WCF client channelfactory <>, "the server fails to recognize the value of the HTTP header soapaction" appears ".
Solution:
Add the property [soapdocumentservice (routingstyle = soapserviceroutingstyle. requestelement)] To the. NET WebService class (that is, the class under the. asmx file).
//
// summary description for service1
//
[WebService (namespace = "http://tempuri.org/ ")]
[webservicebinding (conformsto = wsiprofiles. basicprofile1_1)]
[soapdocumentservice (routingstyle = soapserviceroutingstyle. requestelement)]
[system. componentmodel. toolboxitem (false)]
// to allow this web service to be called from script, using ASP. net Ajax, uncomment the following line.
// [system. web. script. services. scriptservice]
public class submitformtestservice: system. web. services. webService