What is the maximum size of web.config?

When I tried to open the extended SharePoint site, I got a 500 error. The error message was:

Cannot read the configuration file because it exceeds the maximum file size

My file web.configwas only about 260 KB because it had so many records <SafeControl>. After deleting some old records and receiving a file up to 186 KB, my site started loading correctly.

My question is:

  • What is the maximum size of web.config?
  • What can be done to avoid such problems in the future?
+5
source share
1 answer

Its not hardcoded its definition in

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB

or on 64-bit machines

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

" ", MaxWebConfigFileSizeInKB, 250

, web.config , ,

+10

All Articles