錯誤資訊:
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> 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> |
原因分析
因為網路服務組並沒有足夠的許可權臨時 ASP.NET 檔案的檔案夾,安裝 Active Directory 安裝 IIS 6.0 和 ASP.NET 時,則會出現此問題。
解決辦法
這是由於內容中包含html標籤造成的在web.config中添加如下屬性
| 代碼如下 |
複製代碼 |
<system.web> <httpRuntime requestValidationMode="2.0" /> </system.web> |
如上顯示不是真實錯誤資訊,如想看到真實錯誤資訊有兩種方法,
第一種方法在伺服器上開啟網站,即可看到具體錯誤資訊。
第二種方法上面按照錯誤資訊提示,修改web.config檔案中的customErrors節點中的mode為Off,然後開啟網站即可看到具體錯誤資訊。
第三種方法
如果沒有部署bin檔案,如果有的話,你把bin檔案裡面的那個DreamweaverCtrls.dll複製一下,然後把bin檔案刪除,再在之前的目錄下面建立一個bin檔案,把DreamweaverCtrls.dll粘貼進去。如果還是不行那就是iis的問題。
你需要,開始》》運行》》cmd》》輸入cd C:WINDOWSMicrosoft.NETFrameworkv2.0.50727 斷行符號》》aspnet_regiis.exe/i 斷行符號》》他會提示asp.net正在安裝。之後安裝完成然後你再去重新啟動一下iis就可以了,啟動方法為:右擊我的電腦》》管理》》服務和應用程式》》右擊Internet資訊服務》》所有任務》》重新啟動iis,
這樣應該就行了