:^OHopefully, there is a quick an simple answer for this, but I can't seem to place my finger on it right now.
Here is the issue:
I have a Nant script with a iis restart task that uses to w3svc service on the server that iis needs resetting. The execution of this task works great from the command line and does exactly what needs to be done.
<echomessage="Restarting iis" />
<servicecontrolleraction="Stop" service="w3svc" machine="myServer" timeout="10000" verbose="true" />
<servicecontrolleraction="Start" service="w3svc" machine="myServer" timeout="10000" verbose="true" />
When I try testing this on TeamCity it gives me the following error?
Cannot open w3svc service on computer 'myServer
Does anyone know why this is happening and how can I get around this?