Hello @Arin Leviti The error message you’re seeing is a common one in ASP.NET Core applications when an unhandled exception occurs. It suggests switching to the Development environment to get more detailed information about the error. To switch the environment on your Azure virtual machine, you can try the following steps:
- Set the ASPNETCORE_ENVIRONMENT variable: You can do this in the Azure portal. Go to your Web App’s configuration, find the “Application Settings” section, and add the “ASPNETCORE_ENVIRONMENT” variable with the value "Development".
- Modify your Startup.cs file: In the
Configure()
method of your Startup.cs file, you could try addingapp.UseDeveloperExceptionPage();
. This will enable the Developer Exception Page when the ASPNETCORE_ENVIRONMENT is set to Development. - Modify your web.config file: If you have a web.config file, you can add an environment variable there. If you don’t have one, you can create one. The environment variable should look like this:
<aspNetCore processPath="dotnet" arguments=".\\YourProjectName.dll" stdoutLogEnabled="false" stdoutLogFile=".\\logs\\stdout">
<environmentVariables>
<environmentVariable name="ASPNETCORE_ENVIRONMENT" value="Development" />
</environmentVariables>
</aspNetCore>
Remember to replace “YourProjectName” with the actual name of your project. Please note that these steps will expose detailed error messages which can include sensitive information, so they should only be used for debugging. Once you’ve finished debugging, remember to set the ASPNETCORE_ENVIRONMENT variable back to “Production” or another appropriate value. This should get you started.