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:
- AsyncTimeoutAttribute – Represents an attribute that is used to set the timeout value, in milliseconds, for an asynchronous method.
- NoAsyncTimeoutAttribute – Provides a convenience wrapper for the AsyncTimeoutAttribute attribute to set the timeout value to indefinite.