I have Windows Server 2003 (IIS 6.0) and Windows Server 2008 (IIS 7.0) servers, and I use MSBuild for deploying web applications.
I need to do a safe deploy, and do this:
Stop a website in IIS 6 (or an Application in IIS 7), not stop AppPool.
Check if the website is stopped; not running.
If the website is stopped, do another task for deploy.
Start the website IIS 6 (or Application in IIS 7),
How can I achieve this?
Update: Key for me: IIS6WebSite and IIS6AppPool (and for IIS7), do wait for stopped status when try Stop Website or AppPool?
When I execute Stop Action for Website (or Stop Action for AppPool), I need be sure 100% that Website is stopped, and then, and only if Website is Stopped, I can execute other targets.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…