asp.net 和 window server空間的問題!!

2008-07-08 9:42 am
請各位高手解答=]
我用Visual C#寫左一個asp.net 出黎...係asp2.0黎既...
我租左個window server空間放衣個asp.net落去....
但係呢...我放左入去之後佢彈error:

Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

究竟點搞好><thx!

回答 (2)

2008-07-08 10:40 am
✔ 最佳答案
主要係佢出現左錯誤,而因為你係遠端主機關係,係安全性上會hide錯誤原因而降底顯示程式碼而被使用漏洞既風險。

你只要係web.config上,係<customErrors >中將mode設為off就可以睇到原整錯誤原因。

但以你既情況睇黎,應該未將你既asp.net程式資料夾,係伺服器IIS中設為"application"
2008-07-08 10:35 am
改 web.config 檔。Visual Studio 或 Visual Web Developer 已經 comment out
<!-- <customErrors mode="RemoteOnly" /> -->
Uncomment 並改為
<customErrors mode="Off"/>

RemoteOnly 是在 web server 才看到 error message,Off 會令 error message 在 browser 顯示出來,要知錯乜先知點改。


收錄日期: 2021-04-25 20:33:07
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20080708000051KK00223

檢視 Wayback Machine 備份