[原]Runtime Error---Description: An application error occurred on the server....
2010-1-7閱讀2010 評論3
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>
程序在本機上運行是正確的,放在服務器上出現這個問題
解決:出現此問題我目前遇到過兩類:
1、程序是2.0此時在服務器端置,選擇控制面版--IIS--選擇網站名稱--右擊屬性--ASP.NET查看版本是否是2.0,如果不是選擇修改后OK。
2、放置系統的服務器本身出現問題並調試后,發現<解決1>的方法都正常,但問題還是報錯,此時需要重要配置下網站,可以將原有網站移除后重新設置一下一般就OK。
這是我遇到出現此類問題的兩次,大部分還是第一種。