简体   繁体   中英

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.

The site runs fine in development in Visual Studio. And I can request simple html pages, or aspx pages, and they return fine. I've tested if asp.net works by adding an aspx page that returns inline <%= DateTime.Now.ToShortDateString() %>, which also works fine. So I think the problem is situated with MVC itself or the Routing.

MVC3 is installed on the server, but I also tried bin deploying by setting all MVC related references to copy local = true .

Any ideas?

Edit:

I enabled failed request tracing, which results in no error logs.

Customerrors are off & Server errors are detailed:

<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.

I checked the event log for the webserver, nothing to find.

After some restarts I'm getting a somewhat more detailed error:

http500

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. Check your MVC environment and make sure all dependent library have been installed correctly. It's very difficult to tell what's going wrong without seeing the actual error message.

Good luck

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM