I've an MVC Azure Webapp with a file upload and I'm getting timeout error when I try to uplaod file bigger than 1MB (I don't know why this size is the "limit"). With smaller file everything is ok.
In my Web.config I put:
<httpRuntime targetFramework="4.5.2" maxRequestLength="10240" executionTimeout="600"/>
under <system.web>
section and
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="1024000000" />
</requestFiltering>
</security>
under the <system.webServer>
section but that didn't solve the problem.
(In any case default maxAllowedContentLength is 28MB and default maxAllowedContentLength is 4MB so it should be ok with 1MB files!)
I also tried to set the SCM_COMMAND_IDLE_TIMEOUT Application Variable (as indicated here ) from Azure Portal to the value 360 but the problem persists.
Azure Service Plan for the webapp is Standard1 so it isn't free or shared and the "Always On" switch in the application setting is set to "Yes"
What am I doing wrong?
EDIT: another, maybe important, detail is that the request timeout is always given after 4 minutes
Solved: I figure out it was not a problem about the file size but actually it was the 4 minutes timeout due to a time consuming task performed on the uploaded file and executed within the http context. I split the logic keeping just the file upload in the controller and using an Azure Queue to notify a new Azure WebJob when a new file has been uploaded. The new WebJobs now takes care of the time consuming elaboration over the file rows.