Web.config size limit error

2

When I run my website on VS2013, I get an error screen with the following message:

The requested page cannot be accessed because the related configuration data for the page is invalid.

Error Code      0x80070032 
Config Error    Cannot read configuration file because it exceeds the maximum file size  

I tried following a few other answers here in this site and on MSDN, and added the registry keys (both under ..\InetStp\Configuration as well as under ..\IISExpress\Configuration, and restarted IIS Express, however that didn't help.

Unfortunately, splitting the web.config file is not an option. Is there something else that I can try?

iis
visual-studio-2013
iis-express
web-config
asked on Stack Overflow Jun 11, 2014 by Sayak Banerjee

1 Answer

4

IIS Express is the default web server for web application projects in Visual Studio 2012 and Visual Studio 2013, and it is recommended for both web application projects and web site projects. As explained in this Link, the maximum size of a web.config file is 250 KB but you can increase the value by adding MaxWebConfigFileSizeInKB key under Microsoft\InetStp\Configuration registry key and increase the limit (or set 0 for unlimited size).

However, IIS Express 8 does NOT honor this registry setting.

Instead, if you are running IIS Express 8, you need to create MaxWebConfigFileSizeInKB under the following keys when you are using large web.config files:

For 32bit processes:

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\IISExpress\8.0\mimic\Configuration

For 64bit processes:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\IISExpress\8.0\mimic\Configuration

You need to restart IIS Express 8 for the changes to take effect.

answered on Stack Overflow Jun 11, 2014 by Ragu

User contributions licensed under CC BY-SA 3.0