Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ASP.NET Core launch settings: IIS Express, IIS, Project, Executable

Tags:

My Google skills are lacking at the moment. When should I be using IIS Express vs. IIS vs. Project vs. Executable? What are the pros/cons of each?

Launch settings

like image 419
burnt1ce Avatar asked Aug 11 '18 15:08

burnt1ce


People also ask

How do I access IIS Express settings?

Select the web application project and open properties -> select the web tab -> under server's select IIS express-> Specify the project URL. Now open the project folder and . vs folder (Hidden) -> Config -> applicationhost. config and make required configuration changes as detailed above.

How do I run .NET Core Web API in IIS Express?

Press the run button on Visual Studio, it will start building the Dot Net Core Web Api project, the Api will be hosted under IIS Express and it will open a local browser with the localhost and some port will be assigned along with the default controller and action and with a Swagger UI.

How do you check ASP.NET Core module is installed in IIS Express?

You can check if you have the module in your IIS Express configuration file %\PROGRAMFILES(x86)%\IIS Express\config\templates\PersonalWebServer\applicationhost. config . If there is at least one of the following lines, then you have the module installed: <add name="AspNetCoreModule"...


1 Answers

  • IIS Express: A common default that runs the ASP.NET Core application behind the IIS Express development server. This is a good default.
  • IIS: When you actually have a full IIS installed, you can set this up, so that your application runs directly behind IIS. That isn’t really a good choice for development, at least not for ASP.NET Core, and I actually don’t even know if this works properly with ASP.NET Core.
  • Project: This runs the application as a console application. As a result, this is the same as running dotnet run from the command line. This is also a very good option for debugging, as you can directly see the logging output. Depending on your target production environment, this might even make more sense than running behind IIS Express.
  • Executable: This allows you to run an arbitrary executable. That’s not really useful for running your ASP.NET Core project.

So basically it comes down to IIS Express or Project. These are the two that are also configured properly by default in the launchSettings.json file that comes with the ASP.NET Core application template.

Whether you prefer IIS Express or running the application directly probably comes down to personal preference. So just give both a try and see what feels nicer to you.

like image 90
poke Avatar answered Oct 11 '22 20:10

poke