I am trying to deploy an ASP.NET application. I have deployed the site to IIS, but when visiting it with the browser, it shows me this:
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
After fiddling around with the web.config, I got:
The page cannot be displayed because an internal server error has occurred.
How can I see the actual issue behind this server error?
Probably your web.config file is wrong or is missing some tag. I solved my problem using the correct config tags for .NET 4.
If you're using a custom HttpHandler (i.e., implementing
IHttpModule
), make sure you're inspecting calls to itsError
method.You could have your handler throw the actual
HttpExceptions
(which have a usefulMessage
property) during local debugging like this:Also make sure to inspect the Exception's
InnerException
.I have been facing the same issue, but now my issue has been resolved. Always use in this hosting this it works.
I will also recommend you all to do whatever changes you are looking to make in your web.config file. Please do it one by one and test the same on the live domain so that you can find the exact problem or the features that your hosting provider does not allow you to use.
Before changing the
web.config
file, I would check that the.NET Framework
version that you are using is exactly (I mean it, 4.5 != 4.5.2) the same compared to yourGoDaddy
settings (ASP.Net settings in yourPlesk panel
). That should automatically change your web.config file to the correct framework.Also notice that for now (January '16),
GoDaddy
works withASP.Net 3.5
and4.5.2
. To use4.5.2
with Visual Studio it has to be2012
or newer, and if not 2015, you must download and install the .NET Framework 4.5.2 Developer Package.If still not working, then yes, your next step should be enabling detailed error reporting so you can debug it.
I finally solved this "500 Internal server" error when deploying the ASP.NET MVC 3.0 application on godaddy.ocm shared hosting.
somehow there were discrepancies on the version of DLL files referenced and version mentioned in file
web.config
.I tried all the options mentioned in various forum. Nothing helped, although everyone suggested the same kind of fix, but somehow it didn't work in my scenario. Finally after banging my head for two days. I decided to delete all DLL file reference and delete web.cofig (make a local copy) from the project and let the application throw the error and then add the DLL files one by one making copy to local=true.
After all the DLL files were added, I created a new ASP.NET MVC application and copied the web.config of new application to my actual application. So my actual application now has a new web.config, and then I copied the connectionstring and other references from the local copy of web.config that I saved.
I just compiled the application and published to a local folder and FTP the published folder to goDaddy.
It worked and finally my problem was solved.
500 internal server error can arise due to several reasons. First reason might be that web.config file is not properly created, means you have missed some tag in the web.config file. Secondly this error can be due to some code problem. To check which component of the web application is causing this error you can check Application setting in web.config file. The detail of solving and tracing 500 internal server error with diagram is given here: