I am writing an ASP.NET Core application and I have a launchSettings.json
file with the following content:
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:50251",
"sslPort": 44349
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"AspNetDockerDemo": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
},
"Docker": {
"commandName": "Docker",
"launchBrowser": true,
"launchUrl": "{Scheme}://{ServiceHost}"
}
}
}
Question: Where are the { }
placeholders substituded and where are the values definied by which they are substituted? What will I have to do if I want to define such values on my own?
In launchSettings. json, the settings in the Docker section are related to how Visual Studio handles containerized apps. These command-line arguments for starting your app are used when launching your project in the container. Additional arguments to pass to the docker run command.
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 doesn't answer your question, but if you're asking because you want consistent host port numbers while debugging like I did, you can do this by adding httpPort
and sslPort
to the launchSettings.json file.
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