Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to resolve error 500 on Azure web app?

What I have:

  • VS2015U2
  • ASP.NET 5 MVC 6 website
  • Deployed to Azure Web App
  • The site works locally
  • When I deploy to Azure I get internal server error (500)
  • I'm unable to Attach a debugger since they messed up something with the latest versions (tried manually too https://azure.microsoft.com/en-us/blog/introduction-to-remote-debugging-on-azure-web-sites/)
  • I have app.UseDeveloperExceptionPage(); but I guess the site is failing during configuration so it doesn't display any other information.

So how to resolve this? I need to see the .net exception but I have no idea how to do that.

like image 442
f0rt Avatar asked May 01 '16 14:05

f0rt


People also ask

What does error Status 500 mean?

The HyperText Transfer Protocol (HTTP) 500 Internal Server Error server error response code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This error response is a generic "catch-all" response.

How do I fix error 500 on IIS?

The error 500.19 is an internal server error often occurring on a server using Microsoft IIS software. It indicates that the configuration data for the page is invalid. To solve the issue, delete the malformed XML element from the Web. config file or from the ApplicationHost.

How do you fix the page Cannot be displayed because an internal server error has occurred?

The page cannot be displayed because an internal server error has occurred. If running on Azure, have a look at site slots. You should warm up the pages on a staging slot before swapping it to the production slot.


1 Answers

Try adding Application Insights to the app. You should see errors on startup of your application.

I would also take a look at your startup code to see if you are writing to disk anywhere during configuration or app.start. This might be the case if you are using AAD in any capacity.

You can also hit up the KUDU console by targetting https://sitename.scm.azurewebsites.net . You will be able to navigate in the debugging console to see the RAW logs from IIS. That might shed some light into the situation. See KUDU for more info.

like image 105
CtrlDot Avatar answered Sep 19 '22 09:09

CtrlDot