在 IIS8.5 中设置 MaxWebConfigFileSizeInKB [英] Setting MaxWebConfigFileSizeInKB in IIS8.5

查看:15
本文介绍了在 IIS8.5 中设置 MaxWebConfigFileSizeInKB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 web.config 文件,它引用了一个由内置 IIS 重写模块使用的 rewrites.config 文件.但是我的 rewrites.config 文件大于 250kb,所以我遵循了关于这个的建议 发布.但是,在 IIS 8.5 (Windows Server 2012) 中,这些键似乎被忽略了.我已经搜索了互联网,但在 IIS 8.5 上找不到太多东西,有人对如何增加 maximum.config 大小有任何建议吗?或者将 rewrites.config 拆分成更小的文件?

解决方案

您只需创建密钥.>

右键单击 REGEDIT 中的父节点 - 添加一个名为 Configuration 的新 Key.然后为 MaxWebConfigFileSizeInKB 添加一个新的 DWORD(您可能想要切换到十进制视图)并以 KB 为单位设置值.

我刚刚在 Windows Server 2012 上运行 IIS8.0 的服务器上对大小为 753kb 的 rewritemap.config 文件进行了测试(我在这里假设这与 IIS 8.5 不会有太大的不同).您需要根据是 64 位还是 32 位(参见此处)设置适当的密钥.如果有疑问,请同时设置.我可以确认正在使用此值,因为将值降低到(例如)10 会再次触发错误.

不要忘记重新启动应用程序池.

I have a web.config file that references a rewrites.config file that is used by the inbuilt IIS Rewrite module. However my rewrites.config file is larger than 250kb, so i have followed the advise on this post. However it appears that in IIS 8.5 (Windows Server 2012) these keys are ignored. I've search the interwebs and haven't been able to find much on IIS 8.5, anyone got any advice on how to increased the maximum.config size? Or alternatively split rewrites.config into smaller files?

解决方案

You can just create the key.

Right click on the parent node in REGEDIT - add a new Key called Configuration. Then add a new DWORD for MaxWebConfigFileSizeInKB (you'll probably want to switch to the decimal view) and set the value in KB.

I've just tested this on a rewritemap.config file 753kb in size on a server running IIS8.0 on Windows Server 2012 (I'm making an assumption here that this won't be terribly different from IIS 8.5). You'll need to set the appropriate key depending on whether this is 64bit or 32bit (see here). If in doubt set both. I can confirm that this value is being used since turning the value down to (for example) 10 triggers the error again.

Don't forget to restart the app pool.

这篇关于在 IIS8.5 中设置 MaxWebConfigFileSizeInKB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆