We are running up against some sort of size boundary on the Web.config file in our ASP.NET application. This appears to be 250KB. Is there any way to increase this limit?

EDIT Sorry, fingers got confused typing. 250KB not 250MB :)


Agree with all the comments about looking really hard at the configuration stored in it, but if you even then need to do it, then you will need to set a registry key:

See: HKLM\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (REG_DWORD)



Are you sure web.config is the best place to store what you're storing? You may want to consider moving your settings to a database. I bet with a config file that large that the starting up for your app is huge!

If you need to extent it, consider a configSource to pull out your sessions. If everything is in 1 section, it won't help much though.

  • Sorry, meant to type 250KB not 250MB. Our WCMS takes up a good portion of this. We also have a somewhat significant number of rewrites in here due to the fact that a lot of our URLs have changed since we converted to the WCMS.
    – Kyle
    Sep 14 '10 at 13:22
  • 250KB is a lot more manageable. For URL Rewrite, you can use configSource to have them in a separate file. Here's how to do that: blogs.iis.net/ruslany/archive/2010/05/19/… Sep 14 '10 at 15:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.