qileilove

          blog已經轉移至github,大家請訪問 http://qaseven.github.io/

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

          “/”應用程序中的服務器錯誤。 運行時錯誤 說明: 服務器上出現應用程序錯誤。此應用程序的當前自定義錯誤設置禁止遠程查看應用程序錯誤的詳細信息(出于安全原因)。但可以通過在本地服務器計算機上運行的瀏覽器查看。

          詳細信息: 若要使他人能夠在遠程計算機上查看此特定錯誤信息的詳細信息,請在位于當前 Web 應用程序根目錄下的“web.config”配置文件中創建一個 <customErrors> 標記。然后應將此 <customErrors> 標記的“mode”屬性設置為“Off”。

          <!-- Web.Config 配置文件 --><configuration>    <system.web>        <customErrors mode="Off"/>    </system.web></configuration>
           
          原因1: 這是由于配置中 Asp.Net 程序 沒有顯示詳細的錯誤信息.
          解決:  您必須按照要求,修改 web.config 文件 將 <customErrors mode="Off"/> 設置mode ="Off", 上傳到網站根目錄.然后刷新就可以看到詳細錯誤.然后根據錯誤修改程序就可以了.
          原因2: web.config 文件不是放在www根目錄下.而是放在www的子目錄下等.這樣用戶訪問這個目錄時就會出現提示錯誤.
          解決:  將子目錄下的 Asp.net應用程序移到 www根目錄下. 這樣就可以看到詳細錯誤了.您可以根據錯誤調整程序.
           
          3. 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 <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".
          原因1: web.config 文件不完整.不是合格的asp.net 配置文件.
          解決:  您要檢查web.config 是否合格,有時候是粗心,xml文件不完整.導致的問題
          原因2: asp.net版本問題.asp.net有asp.net 1.1和 asp.net2.0 兩個版本.

           

          posted on 2011-10-26 14:00 順其自然EVO 閱讀(1757) 評論(0)  編輯  收藏 所屬分類: 測試學習專欄

          <2011年10月>
          2526272829301
          2345678
          9101112131415
          16171819202122
          23242526272829
          303112345

          導航

          統計

          常用鏈接

          留言簿(55)

          隨筆分類

          隨筆檔案

          文章分類

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 遂溪县| 新津县| 安庆市| 海阳市| 朝阳区| 阿城市| 个旧市| 色达县| 穆棱市| 福州市| 资源县| 仪陇县| 临沧市| 凤翔县| 博野县| 林芝县| 湟中县| 会泽县| 敦煌市| 波密县| 澄迈县| 正阳县| 茶陵县| 洛阳市| 怀远县| 焉耆| 绵阳市| 林芝县| 开原市| 宁河县| 汉源县| 静乐县| 富平县| 额尔古纳市| 南城县| 广元市| 清水河县| 永康市| 普格县| 古丈县| 大埔区|