title: How can I increase the timeout for an ASP.NET Ajax PageMethod?
body: <p>I have an ASP.NET page with several static methods decorated with <code>[WebMethod]</code> in the code-beside, which in turn are called from javascript using <code>PageMethods.MyMethodName(myParameter, myOnCompleteHandler, myOnErrorHander);</code>.  </p>
  
  <p>One of the methods is called multiple times, and the runtime can be long due to the volume of calls.  Currently, the method is functioning correctly, but calls that take >5 minutes to complete are timing out.  I would like to increase that span to 10 minutes.</p>
  
  <p>I have tried:</p>
  
  <ul>
  <li><code>ScriptManager.AsyncPostBackTimeout = 600;</code></li>
  <li><code>Server.ScriptTimeout = 600;</code></li>
  <li><code>this.Page.AsyncTimeout = new TimeSpan(0,10,0);</code></li>
  <li><code>Sys.Net.WebRequestManager.set_defaultTimeout(600000);</code> in javascript</li>
  </ul>