How do I get detailed information on the cause of 500 error deploying aspnet core app to azure - azure

I am trying to deploy an aspnet core app to azure and getting a 500 error.
These are the steps I have taken to try and resolve the issue.
Publish Profile
DEBUG
Web Config
customErrors mode="Off"
Publish Steps
Remove additional files at destination
Portal Settings
Set environment variable to ASPNETCORE_ENVIRONMENT Development
Diagnostics Logs - All switched ON
Streamed Logs
Live HTTP traffic
Application Events
FREB logs
Log Files Checked
Detailed Errors
http- raw Logs
Kudu - trace logs
Web Server Logs
Event logs
stdout
This is a huge amount of data to trawl through when you dont know what you are looking for. In spite of all the advanced diagnostics tools, there is nothing I can find that helps in any way. There is nothing more than I can find to give the slightest clue as to the cause. Just the same old useless 500 error page.
I have completely deleted and redeployed the app 30+ times from the portal. I have restarted the app many more times from the portal.
I have posted on the Azure forums and there no help to be had there either. Other posts I have read are just guesses without any substantial information as to the cause.
Does anyone have a definitive method to find more detail to the cause?

You could check the detailed error message under D:\home\LogFiles\DetailedErrors folder via Kudu. And you could see most likely causes from the error page, like this.
You could compare your error status code (it could be 500.0, 500.19 etc) with the 500 status codes table form this link to find the possible causes.
Besides, you could try to turn on “Remote debugging” to check if it could step into your controller action code and if any error with your action code.

Related

Azure App Services Web App not registering update

I have a Azure App Service app that I'm trying to get deployed.
Today I ran into an issue where .NET informed me (via the yellow screen of death when I browse to the URL of my app) that I had a missing DLL (for the purposes of this question I don't think it really matters).
I used FileZilla to publish my changes in an attempt to do a manual deployment first and then work my way to automate it.
After so many attempts to fix it I later realized that the error message never changed. I did something more severe and renamed my bin folder into something completely different and the exact same error message would appear.
I've stopped the service, restarted it, and as mentioned, renamed folders, etc. and still the exact same error message persisted.
I also decided to open up the Azure Portal Console for my App Service app to browse a bit and to my amazement, nothing seemed to have reflected at all. The FTP shows one thing and the Console shows another.
Would anyone have any idea as to why this is happening?
I eventually got it to work and I will share what I tried.
I deleted the web app and created it again (I found this to be important the first time around). This was quite time consuming and did help but it wasn't long before the same problem happened again.
Then I finally found a solution that seems to give me consistent results:
I kept on editing the Web.config which seems to force a recompile and clear some sort of cache. So each time the web app stopped updating, I would make a slight change in the Web.config, upload it via FTP and the app finally updates.
If anyone has any more details on this, it would be greatly appreciated.

Why does my Umbraco installation from within the Azure Marketplace always fail?

I am trying to install Umbraco by using the Azure Marketplace. There they offer a template for it. I am always receiving the error below. I tried to install it a couple of times now but I always get the same error.
Does anybody know what this error message means? Is anybody able to install Umbraco by using the template in the Azure Marketplace?
]
You're asking 2 questions above.
Please see my answers and proposed troubleshooting guide/workaround below:
The error message means that the MSDeploy process failed due to some error which renders it unable to deploy the web deploy package for your Umbraco web app.
Yes I am able to provision a Umbraco web app from the Azure Market successfully (Location: Central US) and couldn't reproduce your issue
Troubleshooting Guide:
Append .scm in front of the azurewebsites.net of your Umbraco Web App as shown below and go to the Url.
Click on the Diagnostic Dump. You will be prompted to download a .zip file
Extract the zip file. You should see 2 folders at root level
Go into
LogFiles\SiteExtensions\MSDeploy
You should see the detail log files for MSDeploy
Detailed MSDeploy log messages are in the appManagerLog.xml file.
If it is related to client side issue which can be resolved by yourself, you can try to resolve it and try again.
If it is related to server side issue, you should create a support ticket for Microsoft to look into with the detailed MSDeploy log which pinpoints the root cause which will help them a lot.
Hope this is useful.
A Microsoft employee confirmed this is a bug in the application currently. I have to wait for a fix.
I have encountered numerous problems with the Azure installer of Umbraco, try setting it up in VS2015 then publishing it to Azure. I have found that this works well.

Database Functions Working Until Deployed on Azure

I have an MVC application that I've deployed to Azure. Offline it works with no issue with the code first development. However when deployed to Azure it just gives me a non-de-script Error advising me that there's been an error.
I have a look on the management console for further information but was only able to find an error telling me a fatal error had occurred causing a 500 error. Everything else works on the site with no issue it's just when I'm trying to do anything with the database attached to it.
To publish the app I used the downloaded publish settings from the server so I know connection string and what not are all fine. I've also set up code migrations to fill in gaps in the code first dev work so I can see what I'm missing and I don't know where to go now without a more detailed error message?
Any ideas on where I can possibly look next to try and solve this?

How to further debug a 500 Internal Server Error after upgrade to ASP.NET 5 beta5

I had a site running asp.net 5 beta4, and decided to upgrade to beta5. The site runs locally fine. I pushed the changes to master and it was picked up from bitbucket and deployed successfully.
When I try to hit the site in azure, I get a 500 Internal Server Error. I've tried a number of things, but can't seem to track down the root cause of the failure. I'm looking for suggestions as I'm hitting a wall. From what I've tried below it seems like some fundamental initialization is failing.
Here's what I've tried:
Enabling customerrors="off". I added a web.config to the wwwroot folder with system.web/customErrors mode="Off". I've verified that the web.config is populated correctly in the deployed wwwroot and had the appsettings containing the dnxversion etc merged correctly.
Customizing the custom error page, adding runtimeinfo. I have the following set in my Startup.cs:
app.UseErrorHandler("/Home/Error");. I also have set the error page to display the exception. This doesn't seem to be hit.
Attached to the remote process to debug. Visual studio eventually freezes, so haven't gotten anywhere with this.
Enabled application insights. This registers events when I debug locally, but doesn't capture anything from the azure instance.
Enabled application logs and request failure tracing. The detailed errors show a 500.0, without much detailed information.
Imgur
Imgur
I've also verified through the console that the runtime is set correctly to beta5.
Update:
I set the ASPNET_ENV to Development and it loaded with appsettings loaded via the azure portal. Setting ASPNET_ENV to something else isn't working. I also removed any custom code from startup.cs pertaining to the non-development environments, with no help. I'm still looking for a means of capturing the original error.
Assuming you are targeting DNX451 and not dnxcore50, there is a good chance Azure it still trying to run it against the beta4 runtime instead of beta5. If that's the case, you won't get a decent error message.
Try adding an environment variable in Azure "SCM_DNX_VERSION" and set it to 1.0.0-beta5. It looks like kudu was recently upgraded to support beta5 https://github.com/projectkudu/kudu/commit/55175a017779bf493ff8e6ce87b96dd1451f7d7b, so you might want to try to redeploy from bitbucket in the case that the Kudu team has already deployed this change.
For a little more detail, you can check out my previous answer (although it is very dated and references the old "K" names) here:
Deploying ASP.NET vNext beta 2 on Azure with Kudu
Every time you update to a new beta, you will have to update your SCM_DNX_VERSION environment variable.

Troubleshooting azure website internal error

I am getting an error message on my website:
The page cannot be displayed because an internal server error has occurred.
How do I troubleshoot this. I can't find the log file. Please help.
Some information on debugging youe node.js site on Azure websites can be found here:
http://azure.microsoft.com/en-us/documentation/articles/web-sites-nodejs-debug/
and here: http://www.hanselman.com/blog/StreamingDiagnosticsTraceLoggingFromTheAzureCommandLinePlusGlimpse.aspx
To enable application logging instead of updating the iisnode.yml file, you can also use the portal and from the Website/CONFIGURE tab you can enable application logging to file system.
Also look into: http://blog.azure.com/2014/03/28/windows-azure-websites-online-tools-you-should-know-about-2/ for an easy way to see the log files without installing any tools.

Resources