Minifycode 2022-05-17 Viewed 821 times ASP.Net Core MVC

In this article you will learn what is launchsettings.json .net core.
You will find the launchSettings.json file under the properties folder.

Create a new ASP.NET core web application with the name LaunchSettingsExample. Choose .NET Core & ASP.NET Core 3.1. 
You will see the following contents in the launchSettings.json file.

The launchSettings.json file is used to store the configuration information, which describes how to start the ASP.NET Core application, using Visual Studio.
The file is used only during the development of the application using Visual Studio. It contains only those settings that required to run the 
application. This file is ignored when we publish the app.

{
  "$schema": "http://json.schemastore.org/launchsettings.json",
  "iisSettings": {
    "windowsAuthentication": false,
    "anonymousAuthentication": true,
    "iisExpress": {
      "applicationUrl": "http://localhost:39436",
      "sslPort": 44399
    }
  },
  "profiles": {
    "IIS Express": {
      "commandName": "IISExpress",
      "launchBrowser": true,
      "launchUrl": "index.html",
      "environmentVariables": {
        "ASPNETCORE_ENVIRONMENT": "Development"
      }
    }
  }
}

 

The file have two sections. One is iisSettings and the another is profiles section

iisSettings: contains the settings required to debug the application under the IIS or IIS Express.

profiles section contains the debug profiles. Our example file contains two profiles IIS Express & LaunchSettingsExample (same as the name of the project). 
Visual Studio creates these profiles when it creates the project.

Schema: http://json.schemastore.org/launchsettings.json

The launchSettings.json file is used to store the configuration information, which describes how to start the ASP.NET Core application, using Visual Studio. The file is used only during the development of the application using Visual Studio. It contains only those settings that required to run the application. This file is ignored when we publish the app.
minify code