Asp.net MVC利用WebUploader上傳大文件出現404解決辦法。
阿新 • • 發佈:2018-08-19
老版本 spa strong request 上傳大文件 net conf alt 新版
剛開始我上傳小文件都是比較順利的,但是上傳了一個大文件大約有200M的壓縮包就不行了。在chrome裏面監視發現網絡狀態是404,我分析可能不是WebUploader的限制,應該是WebConfig限制了文件的大小。
不廢話:
這是兼容老版本的配置
<system.web> <!--maxRequestLength就是文件的最大字符數,最大值不能超過2個G左右,executionTimeout是超時時間--> <httpRuntime targetFramework="4.5" maxRequestLength="2147483647"executionTimeout="13600" /> </system.web>
這是新版本的配置
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483647" /> </requestFiltering> </security> </system.webServer>
如果這篇文章對您有幫助,您可以打賞我
技術交流QQ群:15129679
Asp.net MVC利用WebUploader上傳大文件出現404解決辦法。