Issue
If you are using IIS Web server for hosting your application, Sometimes these kind of error can be trigger when try to upload a large file using your application.
Step 4:
Now you edit the configuration. But to apply these configurations you have to restart the IIS server. Type iisreset and press enter.
If you are using IIS Web server for hosting your application, Sometimes these kind of error can be trigger when try to upload a large file using your application.
- "The request filtering module is configured to deny a request that exceeds the request content length."
- "System.Web.HttpException: Maximum request length exceeded."
Reason
Default IIS settings only allow to upload up to 4Mb large files. Rest are filtered and shows the one of above error.
Solution
Solution is you need to increase default max allow file size to what ever you want size. This can be do in two levels
- Application level
- Server level
Lets see how to do each. first we are going to look at "Application Level" configuration changes.
1. Application Level
Step1:
Go to "Control Panel" -> "Administrative Tools" ->" Internet Information Services (IIS) Manager"
Step2:
Expand the connection explorer and double click on the site you working on.
In the right hand panel, you can see the set of icons under few categories, Go to category Management and double click on the "configuration editor icon".
Step 4:
Then the configuration editor window will appear and you have to click the link "Search Configuration" at right hand side pane.
Step 5:
Then "Configuration Search" dialog will appear and first you have to select the "web.config" file and then click the link on right bottom of the dialog.
Step 6:
Then "web.config" file will open in your default XML editor and it shows all the configuration that applicable to particular web site. So now we are going to add default upload limit configuration to MySite01, to override default server configuration.Here I need to allow file upload until 1GB (1*1024*124 = 1048576 KB) size. So what i need to do is just copy and paste following piece of code to the "web.config" file just after start the <configuration> tag.
<system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength="2147483648"/> </requestFiltering> </security> </system.webServer> <system.web> <httpRuntime maxRequestLength="1048576" /> </system.web>
Step 6:
Then your file should looks like this. Be careful someone may be previously added the same configuration to this file. At that situation you have to edit the values instead of newly adding.
Step7:
Now you edit the configuration. But to apply these configurations you have to restart the IIS server. To do so run the command prompt as Administrator (click start button-> type cmd in search box -> once you see the command prompt icon -> right click and select "Run as administrator"). Type iisreset and press enter.
2. Server Level
Setp 1:
Open the command prompt as administrator (click start button-> type cmd in search box -> once you see the command prompt icon -> right click and select "Run as administrator") and go to c:\Windows\System32\inetsrv directory
Step 2:
Type the following command and press enter
Type the following command and press enter
appcmd.exe unlock config -section:system.webServer/security/requestFiltering
Step 3:
If your command is correct and worked properly you can see a result like following window. Actually here disabling the file size validation. But not, increasing the allowed max file size.
Step 4:
Now you edit the configuration. But to apply these configurations you have to restart the IIS server. Type iisreset and press enter.
Thank you very much this was very helpful in a production environment !
ReplyDeleteSincerely ,Aline
I HAVE FOLLOWED EVERY SINGLE STEP BUT THIS IS NOT WORKING FOR ME. HOWEVER, I FIXED THE PROBLEM WITH RUNNING ONE TROUBLESHOOTER. HERE IS FOR THOSE WHO WANT FIX THE PROBLEM ALMOST AUTOMATICALLY>>>> THE TROUBLESHOOTER (UPDATED) . PS IT'S NOT MINE AND I AM JUST SHARING IT HERE... I HOPE IT WILL WORK FOR YOU TOO.
DeleteThank you @Adam N. It worked for me.
DeleteThanks man. I was searching for any working version of it.
DeleteIt worked. Thank you Adam, you just saved me a lot of time.
DeleteThanks buddy for sharing it here. Great share
DeleteTHANK YOU SO SO MUCH...I MUST BUY YOU LUNCH
ReplyDeleteThanks a lot. It helped me a lot.
ReplyDeleteThank you very much. You did a wonderful job with this post. This saved me a lot of time. I owe you Lunch too.
ReplyDeleteNice, thanks
ReplyDeleteThis is an amazing guide. Thank you so much.
ReplyDeleteThis is great. Thanks for this!
ReplyDeleteRescued me.
ReplyDeleteI need this solution but in runtime, without IIS.
ReplyDeletePlease help me
thanks for sharing such an useful info...
ReplyDeletemulesoft training
I really liked your blog article.Really thank you! Really Cool.
ReplyDeletedot net training
dot net online training
Step By Step Guide To Fix "The Request Filtering Module Is Configured To Deny A Request That Exceeds The Request Content Length" Iis Error ~ Code Ketchup >>>>> Download Now
ReplyDelete>>>>> Download Full
Step By Step Guide To Fix "The Request Filtering Module Is Configured To Deny A Request That Exceeds The Request Content Length" Iis Error ~ Code Ketchup >>>>> Download LINK
>>>>> Download Now
Step By Step Guide To Fix "The Request Filtering Module Is Configured To Deny A Request That Exceeds The Request Content Length" Iis Error ~ Code Ketchup >>>>> Download Full
>>>>> Download LINK
Eskişehir
ReplyDeleteDenizli
Malatya
Diyarbakır
Kocaeli
G3Y5D3
Diyarbakır
ReplyDeleteKırklareli
Kastamonu
Siirt
Diyarbakır
NBT
Ankara
ReplyDeleteVan
Hakkari
Edirne
Yozgat
SM0JL
1F3E0
ReplyDeleteMaraş Şehir İçi Nakliyat
Hexa Coin Hangi Borsada
Antalya Parça Eşya Taşıma
Ort Coin Hangi Borsada
Burdur Şehir İçi Nakliyat
Adana Parça Eşya Taşıma
Okex Güvenilir mi
Yenimahalle Fayans Ustası
Luffy Coin Hangi Borsada
826F7
ReplyDeleteMamak Boya Ustası
Kripto Para Nedir
Kırklareli Şehirler Arası Nakliyat
Eskişehir Parça Eşya Taşıma
Kilis Şehir İçi Nakliyat
Tokat Şehirler Arası Nakliyat
Çerkezköy Kurtarıcı
İzmir Evden Eve Nakliyat
Çankırı Lojistik
5AC45
ReplyDeletekaraman görüntülü sohbet odaları
balıkesir görüntülü sohbet uygulamaları ücretsiz
canlı sohbet bedava
canlı ücretsiz sohbet
kars telefonda sohbet
artvin sesli sohbet
antalya telefonda rastgele sohbet
nevşehir canlı sohbet siteleri
telefonda kızlarla sohbet
1877A
ReplyDeleteyalova kadınlarla sohbet
istanbul kızlarla canlı sohbet
hatay random görüntülü sohbet
karaman sesli sohbet sesli chat
osmaniye sesli sohbet uygulamaları
kastamonu mobil sohbet odaları
telefonda sohbet
muş görüntülü sohbet siteleri
çankırı telefonda görüntülü sohbet