2015-10-19 135 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

是否有任何脚本正在执行网站发布?也许有人在添加连接字符串? –

相关问题