Tschareck
Tschareck

Reputation: 4239

What's the maximum size of Web.config?

When I tried to open my SharePoint extended site, I received error 500. The error message was:

Cannot read configuration file because it exceeds the maximum file size

My web.config file was just about 260 KB, because it had so many <SafeControl> entries in it. After removing some of the old entries, and getting the file down to 186 KB, my site started to load correctly.

My question:

Upvotes: 5

Views: 5292

Answers (1)

nyxthulhu
nyxthulhu

Reputation: 9752

Its not hard coded its defined in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB

or on 64 Bit machines

HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB

The "cutoff point" by default, unless you configure the MaxWebConfigFileSizeInKB appears to be 250Kb

Remember you can always split your web.config files into multiple little files to get around this issue,

Upvotes: 11

Related Questions