1

We have an app that we recently upgraded from MVC 3 to MVC 4 and from Visual Studio 2010 to 2012. We're trying to deploy it to Azure, but it doesn't seem to want to run there. It works locally, in IIS Express and the Azure emulator. We can build the image just fine through Visual Studio and via our msbuild project on the command line. We deploy just fine as well.

Then when we browse to our deployment's URL, we get a 500 error, with the message "There is a problem with the resource you are looking for, and it cannot be displayed." It's not a YSOD, which leads me to believe the app can't even start, but the message above is the only feedback I get.

We've tried a bunch of things to get it to work:

  • Upgraded to the latest Azure SDK
  • Changed the target framework on the app to .NET 4.5
  • Deployed on Windows Server 2012 instance

Nothing seems to help. If you know exactly what is wrong, please enlighten me. But what would help immensely is to find the details on that 500 error message I get when I browse. How can I get that?

ageektrapped
  • 14,482
  • 7
  • 57
  • 72
  • possible duplicate of [How to get error details on Azure Web site](http://stackoverflow.com/questions/13185074/how-to-get-error-details-on-azure-web-site) – angularsen Nov 14 '14 at 21:21

2 Answers2

4

The best way to troubleshoot this is to RDP to the Azure VM, open IE, and browse to the DIP. The DIP is the VM's internal IP address (a 10.xxx or 100.xxx address) which you can get from ipconfig. This will give you the more detailed error information that you would expect to get when browsing a website from the server where IIS is running. I suspect it will become immediately obvious once you get that detailed error information, and the root cause will probably be one of two things:

  1. A DLL reference that you didn't set CopyLocal=true for.
  2. An element in your web.config without the appropriate section in <configSections>.
kwill
  • 10,867
  • 1
  • 28
  • 26
2

I'll throw in some tips that have helped me debug Azure deployment issues:

  1. Turn on Intellitrace when publishing. On the Settings screen of the publish menu, under Advanced Settings, check the "Enable Intellitrace" checkbox. Then you can go to Server Explorer in VS 2012, find your Azure instance, right click and select "View Intellitrace logs".

  2. Like @kwill said, you can enable RDP and connect remotely to the box. If you browse around the file system you'll find the intellitrace logs, the config files that were actually deployed, etc.

  3. We had a terrible time upgrading from Azure SDK 1.8 to 2.0. You need to make sure 100% of the DLLs are referencing SDK 2.0. We kept missing references. I would recommend going through every single project and reference and making sure they are using 2.0.

  4. I would enable logging in the application and log to an Azure SQL database or Azure table storage. This has saved us a few times.

In general nothing beats the Intellitrace logs and being able to RDP in and go through the event viewer, IIS logs, config files, etc.

ryan1234
  • 7,237
  • 6
  • 25
  • 36