Lets' say my IIS8 hosted web site is up and running and happily serving requests. Now, from an elevated Powershell, I run:
Stop-WebSite <MyWebSite>
My assumption until recently was that IIS would stop serving new requests, finish up current ones, and then gracefully stop the web site. However, I suspect that this is not always the case: there's a code path in my app like this:
Log("Begin");
try
{
DoSomething(); // can take a few seconds
}
finally
{
Log("End");
}
Occasionally, there would be "Begin" entries in my log without matching "End". Any chance Stop-WebSite forcefully kills the host process?