【发布时间】:2014-03-04 10:19:26
【问题描述】:
无法读取配置文件,因为它超过了最大文件大小。
我遇到了上述错误,因为我的 rewritemap.config 文件大小超过 250KB(带有 IIS 7.5 的 Windows 2008 R2 SP1 服务器
【问题讨论】:
标签: configuration iis-7.5 windows-server-2008-r2 url-rewrite-module
无法读取配置文件,因为它超过了最大文件大小。
我遇到了上述错误,因为我的 rewritemap.config 文件大小超过 250KB(带有 IIS 7.5 的 Windows 2008 R2 SP1 服务器
【问题讨论】:
标签: configuration iis-7.5 windows-server-2008-r2 url-rewrite-module
如果您可以访问注册表并且确实需要大于 250kb 的文件,则可以更改注册表项中的值。
对于 x32 系统:
创建密钥:
HKLM\Software\Microsoft\InetStp\Configuration\
添加 DWORD 值:
MaxWebConfigFileSizeInKB
对于 x64 系统:
创建密钥:
HKLM\Software\Wow6432Node\Microsoft\InetStp\Configuration\
添加 DWORD 值:
MaxWebConfigFileSizeInKB
请务必重新启动或重新启动应用程序池。 This answer to a related question 也可以激发灵感。
注意:如果没有密钥,您可以创建它。 how to create a key on regedit
另一种方法是拆分 .config 文件。 http://forums.asp.net/t/1961321.aspx?Split+web+config+rewrite+rules+in+separate+file
【讨论】: