Thursday, May 2, 2013

500 Internal server error

Issue: When deploying an MVC 4, Azure based site, my team always used to get the exception "500: Internal Server Error".

Resolution: After a long time, we got the problem. The issue was in the web role on which the site was hosted. In this web role, the OnRun method was overriden, but it was empty.





Just replacing it by the following code got the issue resolved! :)






Apparently, the issue was that once the role started running, it had nothing to do and so the role would exit, hence causing the application deployed on it to crash.
Another way of taking care of this issue is to add a sleep in a while(true) statement, if you do not want to invoke the base.Run().

No comments:

Post a Comment