2013-02-26 137 views
3

我開發一個應用程序,我的朋友在Asp.Net中實現,我有一個奇怪的問題。
我從我們的ftp服務器下載了最新的源代碼(我們還沒有安裝源代碼控制工具),當我嘗試編譯並運行應用程序時,IIS會拋出異常。我檢查了目錄,並有一個web.config文件。
我不明白這是什麼錯誤:(。謝謝你的幫助:)。
這是什麼IIS響應:配置文件Web.config不被識別

Runtime Error 
Description: An application error occurred on the server. The current custom error 
settings forthis 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> 
+0

在Web.Config中添加'' – vikas 2013-02-26 12:19:09

+0

在Web.Config中添加''並查看錯誤是什麼 – 2013-02-26 12:27:34

回答

4

哦,我的天啊!我發現問題。我沒有檢查在Windows資源管理器選項'顯示所有已知的文件擴展名',我保存web.config與TXT延長,我沒有看到這種荒謬的錯誤。感謝您的幫助!

2

您需要的部分添加到您的Web.config所以你可以看到實際的異常。

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

沒有改變它爲<customErrors mode="Off"/>你看不到實際的錯誤。
所以將其更改爲

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

,看看實際錯誤你得到。