I have an ASP.NET 5 solution with a website and several project libraries. I'm using MVC 6 and Entity Framework 7. Locally the app is working fine and until today it was working also on Azure deployed as an Azure Website.
But today after the latest deployment on Azure I got an error 500 like this on the startup (still working fine locally):
I tried to get more details by :
- using middleware diagnostics
- adding the customError / httpError settings in the web.config file
- downloading the DetailedError page generated
It seems that the error/exception is happening during the Startup/Configure step but I'm still getting the generic error page without details. Even the version generated on the server (DetailedErrors folder) I got this:
I enabled the Failed Request Tracing but still no useful information:
Even if I strip down the code in the Startup/Configure and add a try/catch as suggested I got the same error without détails. It seems to be a configuration/compilation issue but hard to debug without any information.
In RC1 (as of beta8, perhaps), one should apparently use:
.. which apparently only works if
But this didn't work for me. The error message I was getting was specifically "An error occurred while starting the application", I have found that none of the given configurations will resolve this because the error is occurring before the configurations execute.
Somehow, the publish target folder must have gotten corrupted during publish because I found that deleting the entire deployment directory and re-publishing resolved the problem.
Otherwise, here is the reference:
- docker image not working or running properly
- Missing DLL in docker image after copying published tree inside
- Enable CORS for Web Api 2 and OWIN token authentication
- How can I secure a password from the client side? Is it needed or HTTPS/SSL will suffice? [on hold]
- Compiler Error Message: CS0433: The type 'MasterPage' exists in both 'c:\~\App_Web_ogmril5q.DLL' and 'c:\~\App_Web_ogmril5q.DLL'
- ASP .NET Core Inject Service in custom page filter
- How to get current logged in username from Active Directory?
- How to print similar information as phpinfo() but for ASP.NET?
- Retrofit: Only @Query is working but @Field is not working
- Pass parameters to web api controller with jQuery data attribute