• [转】IIS:Do not nest virtual directories


    原文:https://msdn.microsoft.com/en-us/library/ms178685.aspx#Anchor_6

    Configuration settings for virtual directories are independent of physical directory structure, and virtual directories must be organized carefully to avoid configuration problems. For example, you could have an ASP.NET file named MyResource.aspx with the following physical directory structure.

    C:Subdir1         
              Subdir2             
                      MyResource.aspx
    

    In addition, you might have a configuration file that is located in Subdir1, a virtual directory named Vdir1 that is mapped to c:Subdir1, and a virtual directory named Vdir2 that is mapped to c:Subdir1Subdir2. If a client accesses the resource with the physical location of c:Subdir1Subdir2MyResource.aspx using the URL http://localhost/vdir1/subdir2/MyResource.aspx, the resource inherits configuration settings from Vdir1. However, if the client accesses the same resource using the URL http://localhost/vdir2/MyResource.aspx, it does not inherit settings from Vdir1.(直接通过vdir2访问资源时,vdir1下的web.config不会被继承。) Creating virtual directories in this manner can cause unexpected results, or even an application failure. It is recommended that you do not nest virtual directories, or if you do, use only one Web.config file.

  • 相关阅读:
    Java基础--第二十六天
    Java基础--第二十五天
    Java基础--第二十四天
    Java基础--第二十三天
    Java基础--第二十二天
    Java基础--第二十一天
    Java基础--第二十天
    Java基础--第十九天
    Java基础总结--待续
    docker学习笔记
  • 原文地址:https://www.cnblogs.com/rader/p/4962277.html
Copyright © 2020-2023  润新知