加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > asp.Net > 正文

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

发布时间:2020-12-15 23:38:40 所属栏目:asp.Net 来源:网络整理
导读:如何在web.config中的一个位置元素中指定多个路径:a location path="Images" system.web authorization allow users="?" / /authorization /system.web/location 我们想添加样式和图像到位置,例如位置路径=“图像,样式”. 是否可以在位置元素中放置多个路径
如何在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.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读