31

My newly deployed site is getting a 500 internal server error. I'm trying to deploy Umbraco to Azure.

I've turned off custom errors but that doesn't help.

Is there anyway to see the error that Azure is throwing?

SOLVED
I was able to edit my configuration and setup RDP into my web role. Once on the box I couldn't go to it via IP because I'm using the umbraco accelerator. There was a binding in IIS to go to 0.mydomain.com. If I used that I could see the page from the server and the error came up.

Nate
  • 2,316
  • 4
  • 35
  • 53
  • 1
    Is there some sort of `Development` mode or `Debug` mode? Usually servers suppress errors when they are in a live or production mode, which prevents possible attackers from exploiting malfunctioning code. – Blender Jun 12 '11 at 20:48
  • After reading your comment I switched my instance from production to staging. I still have the same problem. – Nate Jun 13 '11 at 00:02
  • Yep logging in using RDP and viewing the site from the server itself worked for me – Tom Jun 06 '12 at 09:56
  • 1
    Although this question is closed, I still found it as the first hit in a Google result, so for the benefit of others who find it the same way: with Azure web app services you can install the *Azure Websites Event Viewer* extension to see exactly what the error was. – Peter Taylor Aug 01 '16 at 13:49
  • you can always enable web-site diagnotics https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/app-service-web/web-sites-enable-diagnostic-log.md , then you can connect with FTP to your webapp, and there you will find detailed log files... (for me it was in the folder LogFiles/DetailedError) – Ben Croughs Sep 18 '17 at 18:56
  • Remote into the instance and check event viewer? – Igorek Jun 13 '11 at 02:35

2 Answers2

12

For 500 errors, one good way is to turn diagnostics on and to look at the logs - both the application event logs and the failed request logs might help. Here's one post about this - http://oakleafblog.blogspot.com/2010/11/adding-trace-event-counter-and-error.html

As Igorek has said, you can also use RDP (remote desktop) to log in and to check the app - here's a good blog post about this - https://blogs.msdn.com/b/jimoneil/archive/2011/04/11/500-and-other-errors-in-azure-deployments.aspx


My guess is that you might be missing one or more Assemblies from the deployed package

Stuart
  • 66,722
  • 7
  • 114
  • 165
11

You don't have to use RDP, simply by turning off custom error in Web.Config will do. But make sure you are adding that in the root Web.Config, that will do the trick.

Here is an example of mine:

<system.web>
    <customErrors mode="Off" />
    <compilation debug="true" targetFramework="4.5">
       ........
    </compilation>
</system.web>

Just be aware that there are multiple web.configs in a typical project.. make sure you are adding this in the root web.config (where your Global.asax is) and NOT in Views folder.

Christopher
  • 10,409
  • 13
  • 73
  • 97
Rosdi Kasim
  • 24,267
  • 23
  • 130
  • 154
  • How does turning OFF `customErrors` help debug a 500 error? I tried this for an Azure controller and it doesn't appear to help the debugging process. – tresf Dec 05 '19 at 20:56
  • @tresf, Once you turned off customErrors, you should be able to see all the exceptions in its full glory... the entire stacktrace is shown to you so you can see the exact line where the error originates. – Rosdi Kasim Dec 07 '19 at 03:37
  • Thanks, unfortunately this isn't true for some Azure messages. In my case, I was hitting this problem: https://stackoverflow.com/a/34051995/3196753. We've identified the problem contextually, debugging line by line until it goes away (instead of through a standard error message) and fixed it, but Azure should make this troubleshooting process easier. – tresf Dec 09 '19 at 20:14