ASP.NET Config 파일 계층
Configuration level | File name | File description |
---|---|---|
Server | Machine.config | The Machine.config file contains the ASP.NET schema for all of the Web applications on the server. This file is at the top of the configuration merge hierarchy. |
IIS | ApplicationHost.config | ApplicationHost.config is the root file of the IIS 7.0 configuration system. It includes definitions of all sites, applications, virtual directories, and application pools, as well as global defaults for the Web server settings. It is in the following location: %windir%\system32\inetsrv\config |
Root Web | Web.config | The Web.config file for the server is stored in the same directory as the Machine.config file and contains default values for most of the system.web configuration sections. At run time, this file is merged second from the top in the configuration hierarchy. |
Web site | Web.config | The Web.config file for a specific Web site contains settings that apply to the Web site and inherit downward through all of the ASP.NET applications and subdirectories of the site. |
ASP.NET application root directory | Web.config | The Web.config file for a specific ASP.NET application is located in the root directory of the application and contains settings that apply to the Web application and inherit downward through all of the subdirectories in its branch. |
ASP.NET application subdirectory | Web.config | The Web.config file for an application subdirectory contains settings that apply to this subdirectory and inherit downward through all of the subdirectories in its branch. |
원문
MSDN 원문
그런데 골 때리는 것은 모든 config파일의 구성요소가 위의 계층을 따르지는 않는다는 것.
예를 들어 asp.net 4.0이상에서는 요청 파일 크기 제한 속성은 두 가지인데,
system.web/httpRuntime - maxRequestLength(KB) 는 루트 Web.config -> 웹사이트 Web.config 이고
4.0에서 새로 추가된 system.webServer/security/requestFiltering/requestLimits - maxAllowedContentLength(Byte) 는 ApplicationHost.config -> 웹사이트 Web.config 이다.
댓글
댓글 쓰기