0

For an MVC core live production website, I am trying to understand which commandName setting I should be using in my launchsettings.json. My understanding is that if I set Project it will use the Kestrel server to host the website. If I set IIS it will then use IIS.

From my research into Kestrel, it is said that Kestrel should be used behind one of the main host servers such as IIS due to its lack of features as it was scaled for performance. This begs me to wonder how I would accomplish such a thing. In my current setup, I am using shared hosting to host a website and I would like to know if I should be putting the commandName setting to IIS or Project, will it even make a difference in my case?

Bagzli
  • 6,254
  • 17
  • 80
  • 163
  • A live site on IIS should use `web.config`. `launchSettings.json` should be used only by VS during development https://blog.jetbrains.com/dotnet/2018/11/08/using-net-core-launchsettings-json-rundebug-apps-rider/ – Lex Li Jan 13 '19 at 01:28
  • @LexLi I'm not sure I follow what you are trying to say with that. – Bagzli Jan 13 '19 at 01:40
  • https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/iis/?view=aspnetcore-2.2 No step requires that file. The JetBrains post clearly says what is stored in the JSON file and is only for development usage (consumed by an IDE, Rider or VS). – Lex Li Jan 13 '19 at 01:42
  • @LexLi so you are saying when I publish this to production (in Release Mode) this file is completely ignored and IIS is always used for the hosting? – Bagzli Jan 13 '19 at 01:49
  • @LexLi - If launchsetting json is meant only for dev purposes, then why does the documentation here https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-apache?view=aspnetcore-6.0#publish-and-copy-over-the-app ask us to modify the `launchSettings.json`? – variable Jan 14 '22 at 13:59
  • @variable When I posted that comment in 2019, the article didn't contain anything like that. I don't know why Microsoft adds "Remove https://localhost:5001 (if present) from the applicationUrl property in the Properties/launchSettings.json file" either. You can read more from https://learn.microsoft.com/en-us/aspnet/core/fundamentals/environments?view=aspnetcore-6.0#development-and-launchsettingsjson – Lex Li Jan 14 '22 at 14:28

0 Answers0