[英]Deploying an MVC3 application on IIS7 always returns Http 500 - Internal Server Error
When I try to deploy my MVC3 application on IIS7, on every URL I am getting an Http 500 - Internal Server Error.当我尝试在 IIS7 上部署我的 MVC3 应用程序时,在每个 URL 上,我都会收到 Http 500 - 内部服务器错误。
The site runs fine in development in Visual Studio.该站点在 Visual Studio 的开发中运行良好。 And I can request simple html pages, or aspx pages, and they return fine.
我可以请求简单的 html 页面或 aspx 页面,它们返回正常。 I've tested if asp.net works by adding an aspx page that returns inline <%= DateTime.Now.ToShortDateString() %>, which also works fine.
我已经测试了 asp.net 是否可以通过添加一个返回内联 <%= DateTime.Now.ToShortDateString() %> 的 aspx 页面来工作,这也可以正常工作。 So I think the problem is situated with MVC itself or the Routing.
所以我认为问题出在 MVC 本身或路由上。
MVC3 is installed on the server, but I also tried bin deploying by setting all MVC related references to copy local = true
. MVC3 安装在服务器上,但我也尝试通过将所有与 MVC 相关的引用设置为
copy local = true
来进行 bin 部署。
Any ideas?有任何想法吗?
Edit:编辑:
I enabled failed request tracing, which results in no error logs.我启用了失败的请求跟踪,这导致没有错误日志。
Customerrors are off & Server errors are detailed: Customerrors 已关闭,服务器错误详细信息:
<httpErrors errorMode="Detailed" />
<asp scriptErrorSentToBrowser="true"/>
<customErrors mode="Off"/>
The only thing I am getting is a 500 - Internal Server Error header with a blank page.我得到的唯一结果是 500 - 内部服务器错误 header 带有空白页。
I checked the event log for the webserver, nothing to find.我检查了网络服务器的事件日志,没有找到。
After some restarts I'm getting a somewhat more detailed error:重新启动后,我得到了一个更详细的错误:
You're getting 500 error on on every URL means that the error occurred at a very early state, like app start and your request haven't even handled by the request pipeline.您在每个 URL 上都会收到 500 个错误,这意味着该错误发生在很早的 state 上,例如应用程序启动,并且您的请求甚至没有被请求管道处理。 Check your MVC environment and make sure all dependent library have been installed correctly.
检查您的 MVC 环境并确保已正确安装所有依赖库。 It's very difficult to tell what's going wrong without seeing the actual error message.
如果没有看到实际的错误消息,很难判断出了什么问题。
Good luck祝你好运
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.