code_junkie

ASP.NET MVC and httpRuntime executionTimeout

Nov 13th, 2011
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. <configuration>
  2. <location path="UploadPage.aspx">
  3. <httpRuntime executionTimeout="600"/>
  4. </location>
  5. </configuration>
  6.  
  7. <location path="Images/Upload">
  8. <system.web>
  9. <httpRuntime executionTimeout="600" />
  10. </system.web>
  11. </location>
  12.  
  13. public ActionResult NoTimeout()
  14. {
  15. HttpContext.Server.ScriptTimeout = 60 * 10; // Ten minutes..
  16. System.Threading.Thread.Sleep(1000 * 60 * 5); // Five minutes..
  17. return Content("NoTimeout complete", "text/plain"); // This will return..
  18. }
Add Comment
Please, Sign In to add comment