Web.config size restriction up to 250 KB IIS issue..!!

Posted by Susantaown under ASP.NET on 6/17/2015 | Points: 10 | Views : 2078 | Status : [Member] | Replies : 1
Hi All,

Recently face one problem on web.config file size issue on IIS 7.5 version i.e (Cannot read configuration file because it exceeds the maximum file size) limit 250 KB

Got blog solution to modify registry then restart IIS or splitting web.config file etc.

My Question is :
1: Why Microsoft put file size restriction up to 250 KB for web.config for IIS 7.5 ver onwards ?
2: Modifying the registry file on server, whether the solution is correct/acceptable?

I am looking forward answers for my questions only..


Posted by: Sheonarayan on: 6/17/2015 [Administrator] HonoraryPlatinum | Points: 25

I do not know what to answer because its Microsoft decision to restrict the file size (if it really is). However Microsoft would have done this to avoid taking longer time to read the web.config file at each request / application start. Rest assured that whatever Microsoft does is for our betterment so try to decrease the file web.config file size by keeping your appSettings at other xml file (or .resx resource file). The same can be done for the connectionStrings setting as well.

Modifying registry on the server is not recommended unless you are an expert administrator.

Sheo Narayan

Susantaown, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response