Increasing Web.config size limit

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 :)


Solution 1:

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)

http://support.microsoft.com/kb/954864

Solution 2:

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.