Reputation: 79
I am using CruiseControl.Net for Build and everything works fine. However, when i try to deploy it on QA server for testing, i need to stop IIS. I am able to stop iis on build machine but not QA server which is different from build machine. I get "Error: Cannot open w3svc service on computer ''
I am login as User who has Admin access to both machines.
Please help me.
Thanks, Chandan
Upvotes: 0
Views: 653
Reputation: 933
Here is a little cmd file I wrote to do just that for our CruiseControl.Net server. It can be run from any box on the network. Note the use of the SC command to stop and start the CCService.
@echo off
echo.
echo *********************************************************
echo *********************************************************
echo *********************************************************
echo Author: Al Dass
echo Desc: Remotely stop and starts the CruiseControl.Net
echo service on CCNETBLDSVR
echo.
echo Note: This needs to be done when you change anything
echo in the ccnet.config file --OR-- any of the
echo ccnet_project.config files.
echo *********************************************************
echo *********************************************************
echo.
echo.
echo *********************************************************
echo Stopping CruiseControl.Net windows service on CCNETBLDSVR
echo *********************************************************
echo.
iisreset CCNETBLDSVR /STOP
sc \\CCNETBLDSVR stop CCService
TIMEOUT 15
echo.
echo *********************************************************
echo Starting CruiseControl.Net windows service on CCNETBLDSVR
echo *********************************************************
echo.
sc \\CCNETBLDSVR start CCService
TIMEOUT 5
echo.
echo *********************************************************
echo Checking status
echo *********************************************************
echo.
sc \\CCNETBLDSVR query CCService
iisreset CCNETBLDSVR /START
TIMEOUT 3
Upvotes: 2
Reputation: 4065
Which version of Iis are your running? Iis6 or Iis7? Do you want to stop/start the whole Iis or just your website?
Have you tried doing "iisreset machinename" in command line to check if you had rights to remotely administrate your iis server?
Upvotes: 0