Azure - customErrors="off" in web.config is not displaying detailed errors in Azure app (cloud service)

Mike Marks picture Mike Marks · Jul 10, 2013 · Viewed 9.1k times · Source

I have an app deployed to Azure and it uses ADFS (Active Directory Federated Services) for authentication.

When the user tries to navigate to the app on Azure, it redirects the user to the ADFS authentication page. User enters their credentials and clicks OK, and ADFS redirects the user to the landing page of my app.

Everything is working fine up to this point. I'm getting a generic server error on the app once the user hits the landing page. PROBLEM: I need to see the detailed errors. I try setting <customErrors="off" />, repackage my app and redeploy, but that doesn't give me detailed errors:

enter image description here

Here's what I've tried: I've tried packaging my app in Debug mode (after Release mode didn't work), I've edited both web.config's (in the root of the solution, as well as in the Views folder, just to cover all bases). Nothing worked.

What am I doing wrong?

Answer

mcollier picture mcollier · Jul 10, 2013

A couple of things to try:

  1. Are you SURE the customerErrors attribute is set correctly? The Identity and Access tooling in Visual Studio seems to like to reset that back to "Off" (every time you update via the tool).
  2. Are you able to connect to the role instance via Remote Desktop? If so, you could inspect the web.config settings for the site? Browsing to the site from the server might also provide a more friendly error message.
  3. When you RDP into the cloud service, you can look at the Event Viewer to see the detailed error messages.