天天看點

“/”應用程式中的伺服器錯誤和Server Error in '/' Application... 的終極解決方法

“/”應用程式中的伺服器錯誤。 運作時錯誤 說明: 伺服器上出現應用程式錯誤。此應用程式的目前自定義錯誤設定禁止遠端檢視應用程式錯誤的詳細資訊(出于安全原因)。但可以通過在本地伺服器計算機上運作的浏覽器檢視。

詳細資訊: 若要使他人能夠在遠端計算機上檢視此特定錯誤資訊的詳細資訊,請在位于目前 web 應用程式根目錄下的“web.config”配置檔案中建立一個 标記。然後應将此 标記的“mode”屬性設定為“off”。

.web>

原因1: 這是由于配置中 asp.net 程式 沒有顯示詳細的錯誤資訊.

解決: 您必須按照要求,修改 web.config 檔案 将 設定mode ="off", 上傳到網站根目錄.然後重新整理就可以看到詳細錯誤.然後根據錯誤修改程式就可以了.

原因2: web.config 檔案不是放在www根目錄下.而是放在www的子目錄下等.這樣使用者通路這個目錄時就會出現提示錯誤.

解決: 将子目錄下的 asp.net應用程式移到 www根目錄下. 這樣就可以看到詳細錯誤了.您可以根據錯誤調整程式.

asp.net 程式顯示錯誤如下:

server error in '/' application. 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 tag within a "web.config" configuration file located in the root directory of the current web application. this tag should then have its "mode" attribute set to "off".

原因1: web.config 檔案不完整.不是合格的asp.net 配置檔案.

解決: 您要檢查web.config 是否合格,有時候是粗心,xml檔案不完整.導緻的問題

原因2: asp.net版本問題.asp.net有asp.net 1.1和 asp.net2.0 兩個版本.

繼續閱讀