I encountered an issue recently where a bug was occurring when deployed on an Azure website but there was no issue when running the application locally. The stack trace of the exception was not very detailed when you brought it up on screen on the Azure website (only showed the failing controller action and that was it).

After a bit of toiling, I realised that I needed to right click on the Project in Solution Explorer, go to Properties, then click on Package/Publish Web and select the Release configuration mode and uncheck the Exclude generated debug symbols checkbox so that `.pdb` files were included in the output directory on the Azure website:

Once I pushed my changes up to Azure, I could see exactly what was failing!