Is Using web.config File Standard for ASP.NET Core 8 Hosting on Azure App Service?

Kirankumar Bharsadiya 60 Reputation points
2024-09-10T09:12:39.8566667+00:00

Hello Azure Community,

I’m currently working with an ASP.NET Core 8 application hosted on Azure App Service. In previous versions, especially with .NET Framework applications, the web.config file was commonly used for IIS-specific configurations.

I’ve noticed that when deploying my ASP.NET Core 8 application, a web.config file is automatically generated. However, I am wondering whether using the web.config file for configuration is still the standard and recommended approach for ASP.NET Core 8 applications on Azure App Service, or if there are better or more current methods for managing configurations in this environment.

Specifically, I am interested in understanding:

  1. Is the web.config file still a standard practice for configuring ASP.NET Core 8 applications in Azure App Service, or should other approaches be considered?
  2. Are there any particular best practices or considerations for using web.config in the context of Azure App Service?
  3. What are the potential advantages or disadvantages of relying on web.config for configuration in ASP.NET Core 8?

Thank you for your insights and guidance!

Developer technologies ASP.NET ASP.NET Core
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
Developer technologies .NET Other
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 77,686 Reputation points Volunteer Moderator
    2024-09-10T20:04:49.6266667+00:00

    if you pick windows hosting in azure, then web.config is used to configure the iis hosting module. If you pick Linux, or docker containers then it’s not used.

    1 person found this answer helpful.
    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. AgaveJoe 30,126 Reputation points
    2024-09-10T10:18:21.8933333+00:00

    Is the web.config file still a standard practice for configuring ASP.NET Core 8 applications in Azure App Service, or should other approaches be considered?

    Core uses the appsettings.json file for application configuration as covered in the official documentation.

    https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/?view=aspnetcore-8.0

    The web.config is used bootstrap the asp core module.

    https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/web-config?view=aspnetcore-8.0

    1 person found this answer helpful.

  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

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.