Can not read configuration file because it exceed

2019-02-09 18:11发布

问题:

Can not read the configuration file because it exceed the maximum file size

I'm getting above error because my rewritemap.config file size is more than 250KB (Windows 2008 R2 SP1 server with IIS 7.5

回答1:

If you have access to registry and if you really need file greater than 250kb, you can change value in Registry Key.

HKLM\Software\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (for x32 system) HKLM\Software\Wow6432Node\Microsoft\InetStp\Configuration\MaxWebConfigFileSizeInKB (for x64 system)

Note: If there are not the key, you can just create it. how to create a key on regedit

Other alternative is to split the .config files. http://forums.asp.net/t/1961321.aspx?Split+web+config+rewrite+rules+in+separate+file