The server fails to recognize the value of the HTTP header soapaction.

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.