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:
- What is the maximum size of web.config?
- What can be done to avoid such problems in the future?
Its not hard coded its defined in
or on 64 Bit machines
The “cutoff point” by default, unless you configure the
MaxWebConfigFileSizeInKBappears to be 250KbRemember you can always split your web.config files into multiple little files to get around this issue,