当前位置:网站首页>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>边栏推荐
- [comprehensive pen test] difficulty 4/5, classic application of line segment tree for character processing
- Browser based split screen reading
- EDA chip design solution based on AMD epyc server
- Leo-sam: tightly coupled laser inertial odometer with smoothing and mapping
- Automatically set the template for VS2010 and add header comments
- 瀑布流布局
- "How to use" agent mode
- 27 选择器的分类
- 51 single chip microcomputer learning notes (1)
- awk从入门到入土(24)提取指令网卡的ip
猜你喜欢

I hope some suggestions on SQL optimization can help you who are tortured by SQL like me

Leo-sam: tightly coupled laser inertial odometer with smoothing and mapping

32 chrome调试工具的使用

冈萨雷斯 数字图像处理 第一章绪论

As methods for viewing and excluding dependencies

51 single chip microcomputer learning notes (2)

06、类神经网络
![[MySQL must know and know] trigger | permission management](/img/59/cb805d972097a6a8ed7f3ae454a91d.png)
[MySQL must know and know] trigger | permission management

Visual Studio 2022 查看类关系图

IP address classification, which determines whether a network segment is a subnet supernetwork
随机推荐
35 quick format code
bridge-nf-call-ip6tables is an unknown key异常处理
瀑布流布局
Gonzalez Digital Image Processing Chapter 1 Introduction
Bridge NF call ip6tables is an unknown key exception handling
32 chrome调试工具的使用
37 元素模式(行内元素,块元素,行内块元素)
Awk from getting started to digging in (20) awk parsing command line parameters
[C题目]力扣206. 反转链表
[C topic] Li Kou 206. reverse the linked list
When using jetty to run items, an error is reported: form too large or form too many keys
SPI传输出现数据与时钟不匹配延后问题分析与解决
给VS2010自动设置模板,加头注释
"Ask every day" what is volatile
System.AccessViolationException: 尝试读取或写入受保护的内存。这通常指示其他内存已损坏
Install entityframework method
Qt connect 中, SIGNAL,SLOT 与 lambda 对比
Examples of bio, NiO, AIO
I2C device driver hierarchy
关于RDBMS和非RDBMS【数据库系统】