title: ASP.NET WebMethod that works both with and without a Session
body: <p>I am making a ASP.NET web page in C#. I'm finding that if the web page is left alone for a short period of time, I start getting 401 Unauthorized Errors whenever the page attempts to call a WebMethod. I think this is probably caused by the Session timing out.</p>
  
  <p>I only make use of the Session for a short time when the user first enters this page, when I am doing some backend caching and using the Session to keep track. At that time the page is hitting the backend continuously for updates, which would be refreshing the Session. Once this is finished I no longer need any Session state.</p>
  
  <p>Is it possible to have a WebMethod that works without requiring a session state, but it able to find and access it if it one exists? Or if it created an empty session automatically when the WebMethod was called, this would also be fine.</p>
  
  <p>Thanks!</p>