Click here to Skip to main content
15,887,135 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
if (HttpContext.Current.Request.Path.Contains(".asmx") || HttpContext.Current.Request.Path.Contains(".svc"))
{

    string xmlParserstring = GetDocumentContents(HttpContext.Current.Request);
    if (!string.IsNullOrEmpty(xmlParserstring))
    {
        XDocument bodyRequest = XDocument.Parse(xmlParserstring);
        string methodName = bodyRequest.Root
                                        .Elements()
                                        .Where(eqw => eqw.Name.LocalName == "Body")
                                        .Elements()
                                        .FirstOrDefault().Name.LocalName;

        if (methodName.Contains("LogonMethod") || methodName.Contains("UpdatePassword"))
            Log.DebugFormat("Notification from ASMX \\SVC: {0} at {1}", HttpContext.Current.Request.Path, DateTime.Now.ToString());
        else
            Log.DebugFormat("Other Method Names {0}", methodName);
    }                            
}



My custom HttpModule receiving more requests from ASMX\SVC\ASHX\....After executing above said code, HttpModule not able to receive any sub-sequent request instead an application got terminated and not able to catch cause of the issue even Fiddler. Can't we process SOAP request intermediately while application receiving more request from ASMX\SVC\ASHX...? Could anyone help me on this issue?


Note: I don't find any issue after removing above said code from HttpModule. I've not updated anything after receiving SOAP request, instead am just logging the method names.
Posted
Updated 23-Mar-15 4:22am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900