Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 758
redrobot Avatar asked Nov 14 '22 00:11

redrobot


1 Answers

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

like image 109
iNc0ming Avatar answered Dec 06 '22 04:12

iNc0ming