IISExpress application pool recycle
Asked Answered
B

2

9

Is there a way to recycle IIS Express application pool?

If I open cmd and go to C:\Program Files\IIS Express, then run:

 appcmd apppool /?

the list of commands lacks the "recycle" option.

The only workaround I've found is to edit the applicationhost.config file. Only then the IISExpress apppool is recycled.

Is there a more elegant way to achieve that?

Thanks

Beasley answered 1/3, 2016 at 9:13 Comment(2)
Right click the IIS Express icon in the TaskBar kill all websites and then hit Ctrl-F5 in Visual Studio to restart the Website?Sought
@Nikolaj Zander The problem with that is that it returns to first page this way. I'm trying to refresh second page. ThanksBeasley
G
9

IIS Express does not have application pool support at all, as it is just a single process web server. You can kill the process but it won't automatically start.

True application pool support requires a Windows service like Windows Process Activation Service. Thus, if you do want to test out application pool, use local IIS.

Gehman answered 1/3, 2016 at 10:39 Comment(0)
C
7

If you want to "simulate" the app pool recycle to test your app initialization routines you could "touch" the web.config file too.

Just add a space and re-save.

Cherian answered 13/6, 2019 at 19:23 Comment(2)
Whenever I do this using IIS Express, it causes the debugging app to exit and end the IIS Express session.Rothwell
@Rothwell for the VS Solution goto Proprieties > Web and uncheck Enable Edit and ContinueDisendow

© 2022 - 2024 — McMap. All rights reserved.