当前位置:网站首页>Solve the error caused by too large file when uploading file by asp.net
Solve the error caused by too large file when uploading file by asp.net
2022-07-25 15:03:00 【Kimizhou_ blog】
Even in web.config You can't add nodes and settings to , It's a big mistake ,
<httpModules>
<add name="UploadHttpModule" type="Brettle.Web.NeatUpload.UploadHttpModule, Brettle.Web.NeatUpload"/>
</httpModules>
<httpRuntime executionTimeout="6000000000" maxRequestLength="900000000" useFullyQualifiedRedirectUrl="true" minFreeThreads="8" minLocalRequestFreeThreads="4" appRequestQueueLimit="100" enableVersionHeader="true" maxQueryStringLength="10240" />
The solution requires the following three things to solve the problem :
1: stay web.config In file , Of configuration Add the following node to the first node under the node :
<configuration>
<!-- Solve the problem that the uploaded file is too big -->
<configSections>
<sectionGroup name="system.web">
<section name="neatUpload" type="Brettle.Web.NeatUpload.ConfigSectionHandler, Brettle.Web.NeatUpload" allowLocation="true" />
</sectionGroup>
</configSections>2: stay web.config Under the document system.web Add the following nodes under the node of
<system.web>
<neatUpload useHttpModule="false" maxNormalRequestLength="40960000" maxRequestLength="20971510000" defaultProvider="FilesystemUploadStorageProvider">
<providers>
<add name="FilesystemUploadStorageProvider" type="Brettle.Web.NeatUpload.FilesystemUploadStorageProvider, Brettle.Web.NeatUpload"/>
</providers>
</neatUpload>3: At this time, you will find that the local can upload successfully , But in IIS It's still not good , You need to IIS To set up IIS Upload size , The setting method is as follows :
modify IIS Of applicationhost.config
file location : %windir%/system32/inetsrv/config/applicationhost.config
find <requestFiltering> node , Be careful requestFiltering There is no node by default requestLimits Node , You need to add the following nodes , Of course , If the node already exists , Then just modify
Add the following elements to this node :
<requestLimits maxAllowedContentLength="2147483647" /> ( The size of the upload will be changed to 2G)
At this time, you will find that OK 了 .
Be careful : In addition to modification IIS The way of documentation , You can also modify the configuration file , I've experienced :
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="10240" maxAllowedContentLength="2147483647" />
</requestFiltering>
</security>边栏推荐
- Vs2010添加wap移动窗体模板
- I2C device driver hierarchy
- kibana操作es
- sql to linq 之存储过程偏
- 43 盒子模型
- oracle_12505错误解决方法
- 解决asp.net上传文件时文件太大导致的错误
- Awk from getting started to digging in (23) awk built-in variables argc, argc -- command line parameter transfer
- Yes, UDP protocol can also be used to request DNS server
- 没错,请求DNS服务器还可以使用UDP协议
猜你喜欢

流程控制(上)

Resource not found: rgbd_ Launch solution

String type time comparison method with error string.compareto

微信公众号正式环境上线部署,第三方公众平台接入

Melody + realsense d435i configuration and error resolution

Browser based split screen reading

Visual Studio 2022 查看类关系图

Raft of distributed consistency protocol

06、类神经网络

32 use of chrome debugging tools
随机推荐
43 盒子模型
Award winning interaction | 7.19 database upgrade plan practical Summit: industry leaders gather, why do they come?
Browser based split screen reading
PHP 通过原生CURL实现非阻塞(并发)请求模式
Yarn: the file yarn.ps1 cannot be loaded because running scripts is prohibited on this system.
35 快速格式化代码
"Ask every day" how locksupport realizes thread waiting and wakeup
pkg_resources动态加载插件
Thymeleaf notes
Raft of distributed consistency protocol
LeetCode_ Factorization_ Simple_ 263. Ugly number
Is it safe for Guolian securities to buy shares and open an account?
Vs2010添加wap移动窗体模板
[C topic] force buckle 876. Intermediate node of linked list
Melody + realsense d435i configuration and error resolution
Login of MySQL [database system]
How to use the random number function of JMeter
006 operator introduction
Reprint ---- how to read the code?
Ssh server rejected password