user153816
user153816

Reputation: 55

web.config : maxRequestLength not taking effect

I have the following seetings in my web.config file.

<httpRuntime executionTimeout="90000" maxRequestLength="204800" />

But I am not able to upload anyfile which are greater than 50MB. Wht could be the reason. The web browser keeps on waiting for the upload to finish but anyfile lesser than 50MB gets uploaded without any issues. Are there any other pleases I need to check?

Upvotes: 3

Views: 13786

Answers (2)

Sigersted
Sigersted

Reputation: 356

Perhaps 50MB is the maximum allowed filesize upload on the webserver? If this is the case usually an error message is returned.

Can you find out what the allowed maximum uploaded filesize on the webserver is?

P.S.: Information about the system would also be nice. (Windows/Linux/Mac, IIS/Apache ...)

Upvotes: 1

Carter Medlin
Carter Medlin

Reputation: 12465

Place this in your web.config

  <system.web>
     <httpRuntime executionTimeout="360" maxRequestLength="100000" />

That enables a 360 second timeout and 100,000 Kb of upload data at a time.

If that doesn't work, run this command on your IIS server. (replace [IISWebsitename])

C:\Windows\System32\inetsrv>appcmd set config "[IISWebsitename]" -section:requestFiltering -requestLimits.maxAllowedContentLength:100000000 -commitpath:apphost

That enables 100,000,000 bytes of upload data at a time.

Upvotes: 3

Related Questions