微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

在asp.net中的web.config的位置元素中有多个路径

如何在web.config中的一个位置元素中指定多个路径:a
<location path="Images">
    <system.web>
        <authorization>
            <allow users="?" />
        </authorization>
    </system.web>
</location>

我们想添加样式和图像到位置,例如位置路径=“图像,样式”.

是否可以在位置元素中放置多个路径(以及如何)?

谢谢.

干杯

解决方法

除非他们共享相同的根文件夹,否则不能这样做.我已经知道将图像/样式/ javascript转储到单个文件夹中,如“_res”或“_system”,并授权该文件

有关位置元素的更多信息:http://msdn.microsoft.com/en-us/library/b6x6shw7(v=vs.71).aspx

在路径属性上:

Specifies the resource that the contained configuration settings apply to. Using location with a missing path attribute applies the configuration settings to the current directory and all child directories. If location is used with no path attribute and allowOverride is False,configuration settings cannot be altered by Web.config files that are in child directories.

原文地址:https://www.jb51.cc/aspnet/250651.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐