简体   繁体   中英

How can I upload large (30Mb) files in a ASP.NET application ? (VB) I've tried raising MaxRequestLength, but no luck

How can I upload large (30Mb) files in a ASP.NET application ? (VB) I've tried raising MaxRequestLength, but no luck...

I'm using the FileUpload control, I already googled this issue a bit, and people seem to solve it by raising MaxrequestLenght on the web.config file. I did that, and it didn't work.

I also raised it on the code, and still it doesn't work, the page doesn't even do postback.

Any ideas?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM