Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
639 views
in Technique[技术] by (71.8m points)

asp.net mvc 5 - 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. :)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

56.8k users

...