What advantages does IIS Express offer over Kestrel alone for ASP.NET Core development-time?

Tom Pazourek 26 Reputation points
2020-11-26T07:35:40.86+00:00

I understand the differences between Kestrel and proper IIS and that IIS might have some benefits useful for production (various filtering/limiting features, the activation model, etc.) The scenario that's often described is Kestrel that's behind IIS that acts as a reverse proxy and offers few features on top.

But what I fail to understand is what IIS Express brings to the table for development-time. What advantages does IIS Express offer to just using Kestrel alone during development-time?

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,077 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce Zhang-MSFT 3,736 Reputation points
    2020-11-27T09:19:37.257+00:00

    Hi @Tom Pazourek ,

    If you know why you need to use IIS with Kestrel in production mode, you will know the advantages of IIS Express.

    Compared with Kestrel, IIS has many functions, and has always been the first choice for many developers to deploy ASP.NET applications. It can log, request tracking, reverse proxy and even server farm configuration. Since IIS came out, it has been updated in multiple versions, and the latest is IIS10. It has been updated many times. In order to be compatible with various versions of ASP.NET, IIS is getting bigger and bigger. It has comprehensive functions and is very easy to use, but it is not the fastest server at present.

    In order to have a faster server, Microsoft created Kestrel, which is compatible with .NET after 15 years, and can be handed over to IIS before 15 years. The development of technology also ensures that Microsoft can create a faster Kestrel. At the same time, Kestrel is not just a server. It uses a new request pipeline with ASP.NET Core. Things like HTTP modules & handlers have been replaced with simple middleware. The entire System.Web namespace is gone. Another big advantage is designing a web server to take advantage of async from the ground up. So far build the fastest ASP.NET application.

    IIS Express is a lightweight IIS, integrated with Visual studio, designed for developers. IIS Express simulates IIS to the greatest extent, avoiding developers from publishing applications to IIS every time they test. At the same time, the lightweight feature of IIS Express allows developers to have a faster experience when testing.

    Although Kestrel can be used as a standalone web server, Microsoft does not recommend it. In the production environment, IIS acts as a reverse proxy server, sending requests to Kestrel and then entering the application. And before going on stage, developers can use the rich functions of IIS for troubleshooting during testing, which makes up for the shortcomings of Kestrel. Before the test environment, in the application development stage, using IIS Express and Kestrel is the most sensible choice.
    43219-2020-11-27-170020.jpg

    If you use Kestrel alone during development, the code and configuration in the application are set for Kestrel, and configuration conflicts with IIS during testing will cause unnecessary trouble. But using IIS express with Kestrel, these problems can be solved very well, because the configuration from the beginning is for IIS and Kestrel. Therefore, during the development period, it is possible to simulate the production environment as much as possible to greatly shorten the test time, which is a convenience for developers and can also speed up the speed from development to production.


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our  documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best regards,
    Bruce Zhang

    2 people found this answer helpful.

0 additional answers

Sort by: Most helpful