More information.

I notice that when running as the Team City agent, on one of the Agent machines, IIS Express refuses to close gracefully with TASKKILL /IM IISExpress.exe in all cases, no matter what.

For instance, start up IIS on a site on the Team City Agent server (Running Windows server 2008 or sever 2012 I think), and the site runs, then, immediately try to shut it down without doing anything special to the site (IE, don't log into it, don't run any tests on it) and it still won't shut down gracefully.

Same steps on local machine (running windows 8) and IIS has no trouble closing down gracefully. Even if I'm logged into the local machine as the TeamCityAgent user with all the same permissions.

Something odd about these Team City Agent servers is why the sites won't shut down gracefully.
_________________________
Tony Fabris