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?
Asked
Active
Viewed 8,955 times
1 Answers
29
- 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.

poke
- 369,085
- 72
- 557
- 602
-
I actually prefer to use Executable for development. I use 'dotnet' as executablePath and 'watch run --urls http://*:5000'. This allows a recompile upon saving. Very convenient. – ewolfman Mar 15 '19 at 21:12
-
With IIS Express profile we have 2 servers - IIS Express + Kestrel, right? What is the actual reason for that? – Loreno Mar 18 '19 at 09:52
-
1@Loreno Kestrel is always there as the application server for ASP.NET Core. There are many reasons for this but basically just using IIS requires applications to be built in a very specific way (basically managed ASP.NET). That wouldn’t work with how ASP.NET Core is built (being decoupled from IIS). Instead, you have an extremely fast Kestrel web server and IIS only acts as a reverse proxy to Kestrel. So the major part of the work is done by Kestrel. IIS and IIS Express just act as a public server that don’t do much on their own. – poke Mar 18 '19 at 11:34
-
@poke What exactly do you mean by "managed ASP.NET"? The word "managed" seems to be used in many context these days – Loreno Mar 19 '19 at 08:58
-
1@Loreno In terms of IIS this basically means that the application is run by your IIS application pool within the IIS pipeline. In that mode, the application is basically an “IIS application” but specifically for the IIS hosting model. – When you host ASP.NET Core in IIS, you disable this managed pipeline completely and the application won’t run as part of the IIS pipeline. Instead, it’s a separate server application (but with some special integration for performance reasons). – poke Mar 19 '19 at 11:20