<location> 元素
元素
指定需要應用特定的配置設定的資源。
配置結構的示例:
path="path"
allowoverride="true|false" />
可選屬性
屬性 | 選項 | 描述 |
---|---|---|
path | 需要應用特定的配置設定的資源。如果使用 | |
allowOverride | 指定配置設定是否可以由子目錄中的 Web.config 檔案覆蓋。 | |
true | 指定可以覆蓋配置設定。預設值是 true。 | |
false | 指定不能覆蓋配置設定。 |
示例
下例允許匿名使用者訪問 Logon.aspx 頁。
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><configuration>
<location path="Logon.aspx">
<system.web>
<authorization>
<allow users="?"/>
authorization>
system.web>
location>
configuration>
下例只將指定頁面的上載檔案大小限制設定為 128KB。
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><configuration>
<location path="UploadPage.aspx">
<httpRuntime maxRequestLength="128"/>
location>
configuration>
下例不允許子目錄中的 Web.config 檔案更改配置設定。
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
--><configuration>
<location allowOverride="false"/>
configuration>
要求
- Web 平臺:IIS 5.0、IIS 5.1、IIS 6.0
- 配置檔案:Machine.config、Web.config
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/12639172/viewspace-617608/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Location
- Location物件物件
- nginx locationNginx
- window.location.replace vs window.location.href
- location.protocolProtocol
- location.host
- Nginx Location 配置Nginx
- location.reload()
- location.assign()
- location.port
- location.pathname
- location.href
- location.hostname
- location.search
- location.hash
- JavaScript location 物件JavaScript物件
- nginx location指令Nginx
- window.location.href與window.location.hash區別
- location.replace() 方法
- Nginx Location 路徑匹配Nginx
- nginx的location優化Nginx優化
- nginx location匹配規則Nginx
- nginx的location詳解Nginx
- nginx的location匹配順序、優先順序,location對映衝突排查Nginx
- Nginx Location 指令語法解析Nginx
- SSLStrip 終極版 —— location 劫持
- 調皮的location.href
- Avoided redundant navigation to current location: "/users"IDENavigation
- 徹底弄懂 Nginx location 匹配Nginx
- go install: no install location for directory outside GOPATHGoIDE
- nginx與location語法詳解Nginx
- nginx location匹配及rewrite規則Nginx
- Vue, Avoided redundant navigation to current location: "/login".VueIDENavigation
- WPF datagrid scrolldown and change the marked the location in canvasCanvas
- Location配置項及LNMP架構LNMP架構
- Nginx location匹配及Rewrite重寫Nginx
- Nginx(六):配置解析之location解析Nginx
- 自己實現一個window.location
- 在nginx location中用alias代理檔案Nginx