2015-10-19 260 views
1

我在我的解決方案(ASP.NET MVC 5)中有兩個項目,一個用於客戶端,一個用於管理員。這兩個項目在本地運行良好。但是,當我發佈管理項目(位於路徑:root/admin在我的主機),我發現了一個錯誤:'/ admin'應用程序中的服務器錯誤...服務器上發生應用程序錯誤

enter image description here

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.

件事你必須知道,我說:

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

但我沒有看到任何具體的錯誤,我也配置了虛擬目錄root/admin作爲應用程序在IIS中。

我知道這是一個常見的錯誤,但我沒有看到像這樣的任何解決方案:Server Error in '/' Application. ASP.NET

+2

確保您使用'Debug'發佈配置文件能夠看到詳細的錯誤 –

+0

我使用了Debug發佈配置文件,但是我沒有看到任何具體的錯誤@mamodom – mejiamanuel57

回答

2

與源文件作爲web.config一起,我想看看,看看是否ApplicationDbContext是在web.config中兩次,並在加載應用程序時導致問題。


在上面的錯誤信息是這樣的參考:

e:\Web\deliver4\admin\web.config line: 18

那麼,什麼是圍繞在web.config文件中第18行?

+0

我沒有看到任何ApplicationDbContext在我的web.config @JB國王 – mejiamanuel57

+0

我通過FTP與FileZilla輸入,並且我下載了web.config,我在第18行看到: 但在我的項目中,我沒有看到。我做什麼? @JB種類 – mejiamanuel57

+0

是否有任何腳本正在執行網站發佈?也許有人在添加連接字符串? –

相關問題