2011-08-23 40 views
3

我有一個在本地主機上正常工作的ASP.NET Web應用程序。但是,當在IIS中承載以下錯誤消息顯示:IIS中的Web配置錯誤

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> 

我能做些什麼來糾正這個問題?

+0

你得到什麼錯誤只是打開自定義錯誤模式,並找到真正的錯誤。 –

+0

這不是錯誤消息,只是提示您應將customErrors切換爲「Off」以查看真實的錯誤消息。 – Olaf

+0

和錯誤是? – Pleun

回答

2

我不相信這是在全部的錯誤消息,但我認爲,導致這就是你得到的消息部分這是要求你把關閉定義錯誤的爲了看看問題的根本原因究竟是什麼。

如果你打開你的web.config文件並找到customErrors元素,改變modeOff並上傳 - 現在當你打你的網頁有錯誤,你應該找到什麼錯誤的詳細異常消息。

+0

請chk我的問題..我編輯了... – Nithesh

+0

@Nithesh:我的答案仍然存在,將'customErrors'更改爲'mode =「Off」'。 –

-1

當不正確的.net運行時版本針對在asp.net中開發的Web應用程序加載時,此錯誤很常見。

確定哪些應用程序池您的Web應用程序使用,然後檢查這是使用asp.net運行時的版本(右鍵單擊該應用程序池 - >高級設置 - > .NET Framework版本)

+0

不..都是3.5 – Nithesh

0

它意味着您的應用程序出現錯誤,可能是由於許多原因造成的。 做什麼錯誤說....這是添加

<customErrors mode="Off"/> 

<system.web> 

然後重新裝入服務器webconfig文件....現在當你運行應用程序......你會是指出錯誤發生的方向。 然後您將知道確切的情況並糾正問題。

+0

我的答案有什麼問題? – Neelam