tag:help.appveyor.com,2012-11-13:/discussions/problems/1582-iis-failes-to-start-on-the-build-vmAppVeyor: Discussion 2018-10-19T08:17:01Ztag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T16:34:40Z2015-02-12T16:34:40ZIIS Failes to start on the build VM<div><p>Will take a look.</p>
<p>-Feodor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T16:41:29Z2015-02-12T16:41:29ZIIS Failes to start on the build VM<div><p>I've tried starting it manually with the following:</p>
<pre>
<code>before_build: net start W3SVC</code>
</pre>
<p>But I get the following error:</p>
<pre>
<code>net start W3SVC
System error 1068 has occurred.
The dependency service or group failed to start.
Command exited with code 2</code>
</pre>
<p>I then tried:</p>
<pre>
<code>before_build: |
IISReset.exe
net start W3SVC</code>
</pre>
<p>But had similar results, but the error may help:</p>
<pre>
<code>IISReset.exe
Attempting stop...
Internet services successfully stopped
Attempting start...
Restart attempt failed.
The IIS Admin Service or the World Wide Web Publishing Service, or a service dependent on them failed to start. The service, or dependent services, may had an error during its startup or may be disabled.
Command exited with code 1062</code>
</pre></div>James Skimmingtag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T16:53:24Z2015-02-12T16:53:24ZIIS Failes to start on the build VM<div><p>Yeah, that's it. Could you try enabling "iisadmin" service with
Set-Service cmdlet?</p>
<p>-Feodor</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T17:13:18Z2015-02-12T17:13:18ZIIS Failes to start on the build VM<div><p>No luck, it looks like iisadmin was disabled (a prior attempt
showed this), but it still didn't fix it.</p>
<p>The following in yml:</p>
<pre>
<code>before_build:
- ps: Set-Service -Name iisadmin -StartupType Manual
- ps: Set-Service -Name W3SVC -StartupType Manual
- net start iisadmin
- net start W3SVC</code>
</pre>
<p>Results in the following:</p>
<pre>
<code>Set-Service -Name iisadmin -StartupType Manual
Set-Service -Name W3SVC -StartupType Manual
net start iisadmin
The IIS Admin Service service is starting.
The IIS Admin Service service was started successfully.
net start W3SVC
System error 1068 has occurred.
The dependency service or group failed to start.
Command exited with code 2</code>
</pre></div>James Skimmingtag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T17:34:09Z2015-02-12T17:34:09ZIIS Failes to start on the build VM<div><p>This works:</p>
<pre>
<code>Set-Service IISADMIN -StartupType Manual
Set-Service NetMsmqActivator -StartupType Manual
Set-Service NetPipeActivator -StartupType Manual
Set-Service NetTcpActivator -StartupType Manual
Set-Service NetTcpPortSharing -StartupType Manual
Set-Service WAS -StartupType Manual
Start-Service W3SVC</code>
</pre>
<p>Seems while installing additional IIS components we disabled
some services too tight.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T19:54:50Z2015-02-12T19:54:50ZIIS Failes to start on the build VM<div><p>It's been fixed.</p></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/360319402015-02-12T21:10:28Z2015-02-12T21:10:28ZIIS Failes to start on the build VM<div><p>Thanks, all working now.</p>
<p>I think your approach of the locking down the services is
correct, they should just be enabled when choosing IIS.</p></div>James Skimming