您的位置:首页 > 其它

关于虚拟目录继承根Web.Config的问题解决办法

2013-05-21 16:33 274 查看
虚拟目录中的web.config继承了主目录中的web.config大部分主要是由于根目录中的web.config添加了httphandler、 httpmodule 引起的。

只将 httphandler httpmodule的声明添加到location中即可。

如下所示: 

<location path="." allowOverride="true" inheritInChildApplications="false"> 

<system.web>     

<httpModules>      

<add name="UrlRewriteModule"   type="UrlRewritingNet.Web.UrlRewriteModule, UrlRewritingNet.UrlRewriter" />

</httpModules> 

</system.web> 

</location>

path 不用说指定的是一个目录 allowOverride 指是否可以将这个重写 inheritInChildApplications 指是否被子级应用程序继承。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: