autostart website after web deploy
Asked Answered
L

1

0

I have a IIS website with multiple application connected to the same app pool and I deploy regularly some of those website through web deploy with the msdeploy tool. One of this app is set to autostart with the serviceAutoStartEnabled="true" and a matching serviceAutoStartProvider.

It works well when I restart the whole app pool but the autostart is not triggered when I web deploy the website

Is there any way to tell IIS to "restart" fully the website after the deploy and not wait for the first request to it ?

Lightface answered 26/7, 2016 at 15:6 Comment(0)
B
1

You could use a post sync command:

msdeploy -verb:sync -preSync:runCommand="net stop w3svc" -source:webserver60 -dest:auto,computername=serverA -verbose -postSync:runCommand="appcmd start site /site.name: contoso" 

https://technet.microsoft.com/en-us/library/ee619740(v=ws.10).aspx

Blip answered 1/8, 2016 at 1:32 Comment(2)
Isn't it a bit brutal to stop all the IIS service ? I have other app on the IIS that should not be affected.Lightface
This won't stop the IIS service just the site.Blip

© 2022 - 2024 — McMap. All rights reserved.