After deploying my asp.net core app to azure for the first time and ran it, I got the following error:
Error. An error occurred while processing your request. Development Mode Swapping to Development environment will display more detailed information about the error that occurred.
Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application.
Please note that I tried debug and release mode when publishing in visual studio and I made sure that I chose the default migration and have the connection string as well. If possible, can you tell me how to enable development mode as shown or explain the error further? Thank you
Edit: As per the suggestion I received I found the following in cloud explorer log:
Msvsmon was unable to start a server named '127.0.0.1:50867'. The following error occurred: An instance of the remote debugger is already running on this computer, or another process is already bound to the specified TCP/IP port.
Detailed Error Logs Another way to view the failed request traces is to navigate to your app page in the portal. From the left menu, select Diagnose and solve problems, then search for Failed Request Tracing Logs, then click the icon to browse and view the trace you want.
To access App Service diagnostics, navigate to your App Service web app or App Service Environment in the Azure portal. In the left navigation, click on Diagnose and solve problems.
Just so it's clear - still something that comes up in ASP.NET Core 2.0 - and as @Techy stated - is in Azure. Go to Azure, click on your Web App –> "Applications Settings" –> go down to the “App Settings” section and add the “ASPNETCORE_ENVIRONMENT” and “Development”
thanks for your comments. I was able to find error details by adding the following key in application settings in azure portal: ASPNETCORE_ENVIRONMENT with value: Development
I have created a new question regarding the error itself: InvalidOperationException: Could not find 'UserSecretsIdAttribute' on assembly
Thank you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With