| 閱文時長 | | 0.29分鐘 | 字數統計 | | 469.6字符 |
| 主要內容 | | 1、引言&背景 2、解決方案 3、宣告與參考資料 | ||
| 『記一次本地正常上線介面報404』 | |||
| 撰寫人 | | SCscHero | 撰寫時間 | | 2021/12/30 AM11:1 |
| 文章型別 | | 系列 | 完成度 | | 已完成 |
| 座右銘 | 每一個偉大的事業,都有一個微不足道的開始, | ||
一、引言&背景 完成度:100%
a) 應對問題
記一次因父子站點部署結構,上線介面404,本地卻正常,
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL: /Preview/PreviewForPublish
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3770.0
Failed to load resource: the server responded with a status of 404 (Not Found)
b) 應用場景
- 父子站點部署結構,請求介面找不到導致404,
二、解決方案 完成度:100%
部署環境是分父站點和子站點的,這一點被我之前忽略了,正確的應該是請求子站點的,但是卻錯誤的請求了父站點的地址,所以報了404找不到介面,
而本地的請求則是當前的啟動地址,因此可以請求成功,
三、宣告與參考資料 完成度:100%
原創博文,未經許可請勿轉載,
如有幫助,歡迎點贊、收藏、關注,如有問題,請評論留言!如需與博主聯系的,直接博客私信SCscHero即可,
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/400286.html
標籤:.NET技术
