Stop IIS Website before scp-copy to target

Andreas Kroll November 20, 2020

HI all!

I am searching for an option to stop an IIS website before deployment to it. 

I tried using ssh and appcmd (which outside of bitbucket works fine), but I cannot get ssh to cooperate with my wishes. 

Anyone done something similar already?

Thanks

  Andreas

1 answer

0 votes
Sharath Chakali February 22, 2022

Hi @Andreas Kroll 

I am also working on the same requirement. Did you find the solution for this? Please suggest.

Thanks in advance.

Andreas Kroll February 23, 2022

I have created my own deployment via scripts. 

Our project consists of 3 different projects each having it's own needs, so I just put a script on top that lets me command what to deploy where and which feature or release branch to use. 

 

As for the IIS issue: I found that as soon as there is a background job involved, it's not only necessary to stop the site, but you have to additionally stop the app pool process as well. 

As long as I do that, everything works fine. 

Deployment is done via ssh commands: 


ssh %USER%@%SERVER% c:\windows\system32\inetsrv\appcmd.exe stop apppool %MEAPPPOOL%
ssh %USER%@%SERVER% c:\windows\system32\inetsrv\appcmd.exe stop site %MESITE%
Like Oz Benodiz likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events