0

I want to increase executionTimeout of a controller Method. Options i tried so far :

  1. Web.config enter image description here

<location path="Components/FileUploadExplorer/Controllers/FileUpload/ChunkSave" <system.web> <httpRuntime executionTimeout="12000" maxRequestLength="100000" requestLengthDiskThreshold="1024"/ </system.web>

  1. Wanted to try this but not able to Find Current property in the controller. Using .Net 4.5

    HttpContext.Current.Server.ScriptTimeout = 300;

  2. Cant change Timeout in Application_BeginRequest as it will change for all the pages.

Any help is appreciated ?

1 Answer 1

0

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?)

Sign up to request clarification or add additional context in comments.

3 Comments

See my point No 2 above i tried this but Current property is not recognized. So i tried using HttpContext.Server.ScriptTimeout = 300; but looks like it does not work. I tried setting this as first line in the Actionmethod of the controller.
I will update my answer. Using System.Web.HttpContext.Current.Server.ScriptTimeout works for me.
Have u seen this question stackoverflow.com/questions/37474309/… ?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.