5

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

Kyle
  • 165
  • 2
  • 6

2 Answers2

6

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

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.

Scott Forsyth
  • 16,339
  • 3
  • 36
  • 55
  • 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: http://blogs.iis.net/ruslany/archive/2010/05/19/storing-url-rewrite-mappings-in-a-separate-file.aspx – Scott Forsyth Sep 14 '10 at 15:43