SHARE
TWEET

Untitled

a guest Jun 19th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. [WebMethod(true)]
  2. public string DoSomethingOnTheServer() { }
  3.      
  4. private void Application_BeginRequest(object sender, EventArgs e)
  5. {
  6.     // This will set the session to read only for asmx services
  7.     // This will make the asmx services non blocking for other requests as it doesnt lock the session object
  8.     if (Context.Request.Path.Contains(".asmx/"))
  9.     {
  10.         Context.SetSessionStateBehavior(SessionStateBehavior.ReadOnly);
  11.     }
  12. }
  13.      
  14. [WebMethod(EnableSession=true)]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top