Tuesday, June 24, 2014

ASP.NET MVC: Async timeout for AsyncControllers

On one of my projects, we are still using ASP.NET MVC 3. To implement some asynchronous behavior we therefore cannot use the shiny async/await syntax but instead we use the good old AsyncController and AsyncManager. This works fine as long as the async work didn’t take too long. If it took too long, the page was timing out. Changing the ScriptTimeout value made no difference.

In the end we discovered that the AsyncManager is using different timeout values(45 seconds by default) and doesn’t look at the ScriptTimeout value.

To change this value you can use one of the following action attributes:

No comments: