The Development environment shouldn't be enabled for deployed applications error after upgrading to .NET 9

AG 521 Reputation points
2024-11-13T18:14:37.0966667+00:00

Hi,

After upgrading my ASP.NET Core web app from .NET 8 to .NET 9 and published it to IIS using Web Deploy on Release mode I am receiving this error in the browser:

Error.

An error occurred while processing your request.

Request ID: xxxxxxxxx

Development Mode

Swapping to the Development environment displays detailed information about the error that occurred.

The Development environment shouldn't be enabled for deployed applications. It can result in displaying sensitive information from exceptions to end users. For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development and restarting the app.

Developer technologies | ASP.NET | ASP.NET Core
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. AG 521 Reputation points
    2024-11-13T18:41:29.1866667+00:00

    Found the problem as also the project Build successfully one package was not compatible with .NET 9 (Yet).

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.