Note that there are some explanatory texts on larger screens.

plurals
  1. PODetermine if a HTTP request is a soap request on HttpApplication.AuthenticateRequest
    primarykey
    data
    text
    <p>I there a way to know if a request is a soap request on AuthenticateRequest event for HttpApplication? Checking ServerVariables["HTTP_SOAPACTION"] seems to not be working all the time. </p> <pre><code>public void Init(HttpApplication context) { context.AuthenticateRequest += new EventHandler(AuthenticateRequest); } protected void AuthenticateRequest(object sender, EventArgs e) { app = sender as HttpApplication; if (app.Request.ServerVariables["HTTP_SOAPACTION"] != null) { // a few requests do not enter here, but my webservice class still executing // ... } } </code></pre> <p>I have disabled HTTP POST and HTTP GET for webservices in my web.config file.</p> <pre><code>&lt;webServices&gt; &lt;protocols&gt; &lt;remove name="HttpGet" /&gt; &lt;remove name="HttpPost" /&gt; &lt;add name="AnyHttpSoap" /&gt; &lt;/protocols&gt; &lt;/webServices&gt; </code></pre> <p>Looking at ContentType for soap+xml only partially solves my problem. For example, </p> <pre><code>Cache-Control: no-cache Connection: Keep-Alive Content-Length: 1131 Content-Type: text/xml Accept: */* Accept-Encoding: gzip, deflate Accept-Language: ro Host: localhost mymethod: urn:http://www.wsnamespace.com/myservice </code></pre> <p>Some clients instead of having the standard header SOAPAction: "<a href="http://www.wsnamespace.com/myservice/mymethod" rel="nofollow noreferrer">http://www.wsnamespace.com/myservice/mymethod</a>", have someting like in example above. "mymethod" represents the method in my web service class with [WebMethod] attribute on it and "<a href="http://www.wsnamespace.com/myservice" rel="nofollow noreferrer">http://www.wsnamespace.com/myservice</a>" is the namespace of the webservice. Still the service works perfectly normal. The consumers use different frameworks (NuSOAP from PHP, .NET, Java, etc). </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload