Runtime Error---Description: An application error occurred on the server....

[原]Runtime Error---Description: An application error occurred on the server....

2010-1-7閱讀2010 評論3web

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> 


Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL. 


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

<configuration> 
    <system.web> 
        <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/> 
    </system.web> 
</configuration> 

程序在本機上運行是正確的,放在服務器上出現這個問題服務器

 

解決:出現此問題我目前遇到過兩類:app

 一、程序是2.0此時在服務器端置,選擇控制面版--IIS--選擇網站名稱--右擊屬性--ASP.NET查看版本是不是2.0,若是不是選擇修改後OK。網站

二、放置系統的服務器自己出現問題並調試後,發現<解決1>的方法都正常,但問題仍是報錯,此時須要重要配置下網站,能夠將原有網站移除後從新設置一下通常就OK。this

這是我遇到出現此類問題的兩次,大部分仍是第一種。spa

相關文章
相關標籤/搜索