關於Server Error in '/' Application.錯誤

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".

<!-- Web.Config Configuration File -->

<configuration>
    <system.web>
        <customErrors mode="Off"/>
    </system.web>
</configuration>

   先貼上錯誤,本人在項目完成時,一切都看似那麼完美的時候,霹靂出現了。如上所示:遇到此錯誤····網上查閱相關解決辦法·· 都沒有得到解決。於是按照報錯信息修改,發現並沒有用···  無奈··。

   先說說如何遇到此問題的吧。在寫一個人員簡介輸入框的時候遇到,由於需要,要限定輸入框輸入的字符個數(200-600),由於測試,你總不能次次都弄個200字吧··所以本人偷懶,把正則範圍限定爲10-20,進行測試。很是滿意。到最後項目完成。限定改爲200-600的時候,老老實實的搞了200個字左右,提交的時候遇到了這個錯誤···。

  經過仔細調查,發現只要<200字就沒事。隨後就考慮到存儲文本框數據大小的問題。最後翻翻翻,找到問題所在,由於大意,存儲改數據數據庫的字段爲varchar(50),頓時都有種想尿的感覺····。

  所以大家如若遇到這樣的錯誤,要仔細去看細節,包括數據大小,數據類型,此文僅提供大家解決思路和借鑑經驗。若沒有幫到大家,我表示遺憾,“~~猿”別急,冷靜。從細節開始。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章