Reputation: 4480
I want to increase executionTimeout of a controller Method. Options i tried so far :
<location path="Components/FileUploadExplorer/Controllers/FileUpload/ChunkSave" <system.web> <httpRuntime executionTimeout="12000" maxRequestLength="100000" requestLengthDiskThreshold="1024"/ </system.web>
Wanted to try this but not able to Find Current property in the controller. Using .Net 4.5
HttpContext.Current.Server.ScriptTimeout = 300;
Cant change Timeout in Application_BeginRequest as it will change for all the pages.
Any help is appreciated ?
Upvotes: 0
Views: 2650
Reputation: 208
Does this work for you?
How do I set the request timeout for one controller action in an asp.net mvc application
You can set this programmatically in the controller:-
System.Web.HttpContext.Current.Server.ScriptTimeout = 300;
Sets the timeout to 5 minutes instead of the default 110 seconds (what an odd default?)
Upvotes: 0