All of a sudden IIS Express no longer stops when I stop debugging a web site in Visual Studio 2017.
I'm not sure when this behaviour started, but I have the following setup:
net461
Not sure when this started happedning, maybe when I updated to the lastest VS version.
What more can I try?
Closing IIS Express By default Visual Studio places the IISExpress icon in your system tray at the lower right hand side of your screen, by the clock. You can right click it and choose exit. If you don't see the icon, try clicking the small arrow to view the full list of icons in the system tray.
Terminate a debug sessionClick the Stop button on the toolbar of the Debug tool window. Alternatively, press Ctrl+F2 and select the process to terminate (if there are two or more of them).
To start debugging, select IIS Express or <IIS profile name> in the toolbar, select Start Debugging from the Debug menu, or press F5. The debugger pauses at the breakpoints. If the debugger can't hit the breakpoints, see Troubleshoot debugging.
If Enable Edit and Continue
is unchecked Then IIS Express
stays running even after debugging is stopped.
You can uncheck it if you want here:
Right click your project » click
Properties
» select theWeb
tab »Enable Edit and Continue
checkbox
For .net Core web projects in Visual studio 2017
If you add:
<AspNetCoreHostingModel>InProcess</AspNetCoreHostingModel>
or:
<AspNetCoreHostingModel>OutOfProcess</AspNetCoreHostingModel>
in the first PropertyGroup in your project.csproj config you will alter the iis express behavior.
InProcess will kill iis express after debug.
If the setting is missing or set to OutOfProcess iis express will keep the process running.
- This setting updates the .vs\config\applicationhost.config of your solution and hostingModel="InProcess" will be added/removed to the iis express launch config for the project.
<aspNetCore processPath="%LAUNCHER_PATH%" arguments="%LAUNCHER_ARGS%" hostingModel="InProcess" />
(You don't need to change the applicationhost.config, only for reference)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With