JetBrains Rider 2024.1 Help

Run and debug ASP.NET Core apps in IIS Express

Before you start

  1. Download and install IIS Express

  2. To host ASP.NET Core applications, IIS Express relies on the ASP.NET Core Module. You can install the required components in the following order:

    1. Internet Information Services — Windows button | Turn Windows features on or off.

      Install IIS
    2. .NET Core Hosting Bundle

  3. 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"... <add name="AspNetCoreModuleV2"...
  4. If everything is configured correctly, JetBrains Rider will automatically find all necessary components. You can check their paths on the Build, Execution, Deployment | IIS Express page of JetBrains Rider settings Ctrl+Alt+S:

    JetBrains Rider: IIS Express settings

Run/debug configurations

After creating a new ASP.NET Core project or loading an existing one that has a launchSettings.json file with one or more IIS Express profiles, JetBrains Rider will automatically create run/debug configurations based on those profiles.

You can view and edit created configurations either in the Run/Debug Configurations dialog (Run | Edit Configurations) or on the toolbar selector:

JetBrains Rider: IIS Express run configuration

For IIS Express profiles, the run configuration includes a few additional options:

Generate applicationhost.config

To launch IIS Express with your ASP.NET Core application, JetBrains Rider uses a configuration file .idea/config/applicationhost.config, which is created using a template that ships with IIS Express. When possible, customizations you make to this file are also preserved. You might want to disable this option for heavy customizations.

Show IIS Express output

This option enables output from the IIS Express process. By default, it is disabled (as the output is quite verbose), but when enabled we can see additional details when running the application:

JetBrains Rider: IIS Express output

Send debug request

When this option is enabled, JetBrains Rider will send an initial request (with a DEBUG HTTP request method) to the target ASP.NET Core application. This ensures the application is started and the debugger is attached, even when the browser is not started.

Additional IIS Express arguments

This field lets you pass additional arguments to the IIS Express host (for example, to enable request tracing).

As with other launchSettings-based run configurations, you can specify the target framework and additional runtime arguments using this dialog, but some IIS Express-specific options should be configured directly in the launchSettings.json file.

Run and debug

Once everything is installed and configured, you can run your project Shift+F10 or set breakpoints (even in application startup, for example in Configure/ConfigureServices methods) and then debug your code Shift+F9.

Generate a self-signed SSL certificate

For launchSettings-based run configurations, JetBrains Rider will check whether an ASP.NET Core developer certificate or IIS Express self-signed certificate is set up on your machine. If not, you will see a notification which also let you generate one:

JetBrains Rider: Generating a self-signed SSL certificate

Setting up a certificate can be done from that warning, or with the Set up certificate action, which you can find using Find Action Ctrl+Shift+A.

For ASP.NET Core, JetBrains Rider will use the dotnet dev-certs https command to check whether the certificate has been installed. For IIS Express, it will check the http.sys certificate settings (similar to the netsh http show sslcert command line).

It also verifies the certificate is trusted by our system. This should make it easier to develop ASP.NET and ASP.NET Core web applications that make use of SSL on our developer machine.

Last modified: 17 April 2024