国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費(fèi)電子書(shū)等14項(xiàng)超值服

開(kāi)通VIP
IIS7中的自定義 404頁(yè)面錯(cuò)誤
在進(jìn)行如下帶靜態(tài)文件的自定義404頁(yè)面配置時(shí),
您可能會(huì)收到如下錯(cuò)誤(見(jiàn)下圖),
500.19 - Internal Server Error
Absolute physical path "driver:\path" is not allowed in system.webServer/httpErrors section in web.config file. Use relative path instead.
根本原因:
當(dāng)在web.config文件中檢測(cè)到絕對(duì)路徑時(shí),就會(huì)產(chǎn)生此錯(cuò)誤。
目前針對(duì)該問(wèn)題有2種解決方案。
方案1:
1. 在ApplicationHost.config文件中將<system.webServer> <httpErrors>的allowAbsolutePathsWhenDelegated設(shè)置為"true"。
<system.webServer>
...
<httpErrors allowAbsolutePathsWhenDelegated="true">
<error statusCode="401" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="401.htm" />
<error statusCode="403" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="403.htm" />
<error statusCode="404" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="404.htm" />
<error statusCode="405" prefixLanguageFilePath="%SystemDrive%\inetpub\custerr" path="405.htm" />
....
</httpErrors>
</system.webServer>
</location>
<location path="Default Web Site">
<system.webServer>
... ...
<httpErrors errorMode="Custom">
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path="E:\Temp\custom404.html" responseMode="File" />
</httpErrors>
</system.webServer>
</location>
2. 重啟IIS。
方案2
1. 在IIS Manager中,找到Features Views->Management Area,雙擊"Feature Delegation"。選擇Error Pages并單擊Read Only,如下圖。
2. 在C:\inetpub\wwwroot或您的任何網(wǎng)頁(yè)應(yīng)用程序的物理目錄下,打開(kāi)web.config文件,移除以下部分。
<handlers accessPolicy="Read, Script" />
<httpErrors>
<remove statusCode="404" subStatusCode="-1" />
<error statusCode="404" prefixLanguageFilePath="" path=" E:\Temp\error404.html " responseMode="File" />
</httpErrors>
如果在config文件中沒(méi)有其他配置,您可以直接刪除由IIS為delegation Read/Write生成的web.config文件。
3. 重啟IIS。
更多信息
如何在IIS7中進(jìn)行自定義404頁(yè)面設(shè)置。您能通過(guò)以下步驟達(dá)到該目的:
1. 創(chuàng)建一個(gè)名為custom404.html的文件,并保存至您的網(wǎng)頁(yè)目錄(一般情況下為c:\inetpub\wwwroot)。
2. 打開(kāi)Internet Information Services (IIS) Manager。
3. 在Connections窗口內(nèi)(左邊),展開(kāi)相關(guān)節(jié)點(diǎn)至某個(gè)您想要進(jìn)行自定義錯(cuò)誤配置的站點(diǎn),并選定該站點(diǎn)。
4. 在中間窗口的底部,單擊Features View。
5. 在中間窗口,雙擊Error Pages。
6. 雙擊Status Code 404。
7. 在Edit Custom Error Page對(duì)話框中,
a. 在"Insert content from static file into the error response"域中輸入物理路徑。當(dāng)出現(xiàn)找不到頁(yè)面的情況時(shí),就會(huì)返回http 404錯(cuò)誤并顯示自定義的404錯(cuò)誤頁(yè)面。
b. 在"Exectute a URL on this site"域中,輸入絕對(duì)路徑。在本實(shí)例中,輸入/custom404.html。當(dāng)出現(xiàn)找不到頁(yè)面的情況時(shí),就會(huì)返回http 200錯(cuò)誤并顯示自定義的404錯(cuò)誤頁(yè)面。
8. 點(diǎn)擊OK。
參考
HTTP Errors <httpErrors>
http://www.iis.net/ConfigReference/system.webServer/httpErrors
謝謝!
微軟 Internet 開(kāi)發(fā)者支持小組
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
HTTP 錯(cuò)誤 500.19 – Internal Server Error web.co...
ASP教程:第十一篇 ASP內(nèi)建對(duì)象Server
安裝IIS
全面解析Server對(duì)象
MRTG—網(wǎng)絡(luò)流量監(jiān)控工具 windows和linux上的安裝和使用配置方法 第二十一集 ...
.net配置文件
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服