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

前端之家收集整理的这篇文章主要介绍了在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.f2er.com/aspnet/250651.html

猜你在找的asp.Net相关文章