廣告:
asp.net 4.8經(jīng)典模式訪問html偽靜態(tài)頁面提示404錯誤
HTTP 錯誤 404.0 - Not Found
您要找的資源已被刪除、已更名或暫時不可用。
最可能的原因:
指定的目錄或文件在 Web 服務(wù)器上不存在。
URL 拼寫錯誤。
某個自定義篩選器或模塊(如 URLScan)限制了對該文件的訪問。
可嘗試的操作:
在 Web 服務(wù)器上創(chuàng)建內(nèi)容。
檢查瀏覽器 URL。
創(chuàng)建跟蹤規(guī)則以跟蹤此 HTTP 狀態(tài)代碼的失敗請求,并查看是哪個模塊在調(diào)用 SetStatus。有關(guān)為失敗的請求創(chuàng)建跟蹤規(guī)則的詳細(xì)信息,請單擊此處。
詳細(xì)錯誤信息:
模塊 IIS Web Core
通知 MapRequestHandler
處理程序 StaticFile
錯誤代碼 0x80070002
請求的 URL http://192.168.0.101:80/site/showpress/8.html
物理路徑 D:\4.0web\53bk公司網(wǎng)站發(fā)布\53bk公司網(wǎng)站發(fā)布\site\showpress\8.html
登錄方法 匿名
登錄用戶 匿名
詳細(xì)信息:
此錯誤表明文件或目錄在服務(wù)器上不存在。請創(chuàng)建文件或目錄并重新嘗試請求。
查看詳細(xì)信息 »
web.config設(shè)置:
<system.webServer> <validation validateIntegratedModeConfiguration="false" /> <modules runAllManagedModulesForAllRequests="true"> <add name="HttpImageModule" type="Mvccom.HttpImageModule,Mvccom" /> </modules> <handlers> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" /> <remove name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" /> <remove name="ExtensionlessUrlHandler-Integrated-4.0" /> <!-- <add name="ExtensionlessUrlHandler-ISAPI-4.0_32bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness32" responseBufferLimit="0" /> <add name="ExtensionlessUrlHandler-ISAPI-4.0_64bit" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />--> <add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="GET,HEAD,POST,DEBUG,PUT,DELETE,PATCH,OPTIONS" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" /> <!--以下為經(jīng)典模式用--> <add name="mvc64" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" /> </handlers> </system.webServer>
解決方案為添加:
iis-處理程序映射--添加腳本映射--請求路徑 * ,名稱為mvc64,請求限制為 僅當(dāng)請求映射到以下內(nèi)容才調(diào)用處理程序前面的勾去掉。
<add name="mvc64" path="*" verb="*" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="None" preCondition="classicMode,runtimeVersionv4.0,bitness64" responseBufferLimit="0" />
廣告: