# Iis cookbook trouble

**URL:** <https://discourse.chef.io/t/iis-cookbook-trouble/5934>\
**Category:** Chef Infra (archive)\
**Created:** [November 14, 2014, 4:57am UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934 "2014-11-14T04:57:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_Barry1](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kenneth\_Barry1](https://discourse.chef.io/u/Kenneth_Barry1)\
**Post date:** [November 14, 2014, 4:57am UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934/1 "2014-11-14T04:57:10Z")

</div>

If i run the following from the cmd prompt in windows, it works just fine:

C:\Windows\System32\inetsrv\appcmd.exe set config  
-section:system.webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE”  
/commit:apphost

I have a iis\_config resource block. Getting an error, indicating my syntax  
is incorrect. But note what the error says was run:

==\> default: Ran  
C:\Windows\System32\inetsrv\appcmd.exe set config  
-section:system.webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE”  
/commit:apphost returned 4312

what gives?  
The provider uses cmd, and I am assuming that means, “just as if you were  
to open the cmd prompt in windows”

FYI I get a similar error when trying the above command while in a  
powershell prompt.

Full error below:

# ==\> default:

# ==\> default: Error executing action `config` on resource ’iis\_config[-section:system.webServer/handl ers /[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE” /commit: apphost]’ ==\> default:

==\> default: Mixlib::ShellOut::ShellCommandFailed  
==\> default: ------------------------------------  
==\> default: Expected process to exit with [0, 183], but received ‘4312’  
==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
set config -section:system.  
webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DE  
LETE” /commit:apphost ----  
==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
element. )  
==\> default: STDERR:  
==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe set  
config -section:system.we  
bServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELE  
TE” /commit:apphost ----  
==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
-section:system.webServer/handler  
s  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE”  
/commit:ap  
phost returned 4312  
==\> default:  
==\> default: Resource Declaration:  
==\> default: ---------------------  
==\> default: # In C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb  
==\> default:  
==\> default: 119: iis\_config cmd do  
==\> default: 120: action :config  
==\> default: 121: end  
==\> default: 122: end  
==\> default:  
==\> default: Compiled Resource:  
==\> default: ------------------  
==\> default: # Declared in  
C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i  
n from\_file’  
==\> default:  
==\> default: iis\_config("-section:system.webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrat  
ed-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE” /commit:apphost") do  
==\> default: action [:config]  
==\> default: retries 0  
==\> default: retry\_delay 2  
==\> default: cookbook\_name “tunein-iis”  
==\> default: recipe\_name “default”  
==\> default: cfg\_cmd “-section:system.webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrate  
d-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE” /commit:apphost”  
==\> default: returns [0, 183]  
==\> default: end  
==\> default:  
==\> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed  
notifications before re-raisin  
g exception  
==\> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception handlers  
==\> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers complete  
==\> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to  
C:/var/chef/cache/chef-stacktra  
ce.out  
==\> default: [2014-11-13T22:22:03-06:00] FATAL:  
Mixlib::ShellOut::ShellCommandFailed: iis\_config[-se  
ction:system.webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST  
,DEBUG,PUT,DELETE” /commit:apphost] (tunein-iis::default line 119) had an  
error: Mixlib::ShellOut::  
ShellCommandFailed: Expected process to exit with [0, 183], but received  
’4312’  
==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
set config -section:system.  
webServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DE  
LETE” /commit:apphost ----  
==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
element. )  
==\> default: STDERR:  
==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe set  
config -section:system.we  
bServer/handlers  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELE  
TE” /commit:apphost ----  
==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
-section:system.webServer/handler  
s  
/[name=‘ExtensionlessUrlHandler-Integrated-4.0’].verb:“GET,HEAD,POST,DEBUG,PUT,DELETE”  
/commit:ap  
phost returned 4312  
Chef never successfully completed! Any errors should be visible in the  
output above. Please fix your recipes so that they properly complete.

–

Kenneth Barry  
TuneIn | Build and Release Engineer  
M: 409-673-0544  
[www.tunein.com](http://www.tunein.com)

---

<div class="post-metadata">

**Author:** ![Galen\_Emery](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/galen_emery/32/11_2.png) [@Galen\_Emery](https://discourse.chef.io/u/Galen_Emery)\
**Post date:** [November 14, 2014, 6:08pm UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934/2 "2014-11-14T18:08:00Z")

</div>

Kenneth,

What happens if you re-run the chef-client? Here's an old ticket that  
implies this may be a timing issue:  
[https://tickets.opscode.com/browse/COOK-4214](https://tickets.opscode.com/browse/COOK-4214)

On Thu, Nov 13, 2014 at 8:57 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:

> If i run the following from the cmd prompt in windows, it works just fine:
> 
> C:\Windows\System32\inetsrv\appcmd.exe set config  
> -section:system.webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> /commit:apphost
> 
> I have a iis\_config resource block. Getting an error, indicating my syntax  
> is incorrect. But note what the error says was run:
> 
> ==\> default: Ran  
> C:\Windows\System32\inetsrv\appcmd.exe set config  
> -section:system.webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> /commit:apphost returned 4312
> 
> what gives?  
> The provider uses cmd, and I am assuming that means, "just as if you were  
> to open the cmd prompt in windows"
> 
> FYI I get a similar error when trying the above command while in a  
> powershell prompt.
> 
> Full error below:
> 
> # ==\> default:
> 
> # ==\> default: Error executing action `config` on resource 'iis\_config[-section:system.webServer/handl ers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit: apphost]' ==\> default:
> 
> ==\> default: Mixlib::ShellOut::ShellCommandFailed  
> ==\> default: ------------------------------------  
> ==\> default: Expected process to exit with [0, 183], but received '4312'  
> ==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
> set config -section:system.  
> webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> LETE" /commit:apphost ----  
> ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> element. )  
> ==\> default: STDERR:  
> ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe set  
> config -section:system.we  
> bServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> TE" /commit:apphost ----  
> ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> -section:system.webServer/handler  
> s  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> /commit:ap  
> phost returned 4312  
> ==\> default:  
> ==\> default: Resource Declaration:  
> ==\> default: ---------------------  
> ==\> default: # In C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb  
> ==\> default:  
> ==\> default: 119: iis\_config cmd do  
> ==\> default: 120: action :config  
> ==\> default: 121: end  
> ==\> default: 122: end  
> ==\> default:  
> ==\> default: Compiled Resource:  
> ==\> default: ------------------  
> ==\> default: # Declared in  
> C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i  
> n from\_file'  
> ==\> default:  
> ==\> default: iis\_config("-section:system.webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrat  
> ed-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost") do  
> ==\> default: action [:config]  
> ==\> default: retries 0  
> ==\> default: retry\_delay 2  
> ==\> default: cookbook\_name "tunein-iis"  
> ==\> default: recipe\_name "default"  
> ==\> default: cfg\_cmd "-section:system.webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrate  
> d-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost"  
> ==\> default: returns [0, 183]  
> ==\> default: end  
> ==\> default:  
> ==\> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed  
> notifications before re-raisin  
> g exception  
> ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception handlers  
> ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers complete  
> ==\> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to  
> C:/var/chef/cache/chef-stacktra  
> ce.out  
> ==\> default: [2014-11-13T22:22:03-06:00] FATAL:  
> Mixlib::ShellOut::ShellCommandFailed: iis\_config[-se  
> ction:system.webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST  
> ,DEBUG,PUT,DELETE" /commit:apphost] (tunein-iis::default line 119) had an  
> error: Mixlib::ShellOut::  
> ShellCommandFailed: Expected process to exit with [0, 183], but received  
> '4312'  
> ==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
> set config -section:system.  
> webServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> LETE" /commit:apphost ----  
> ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> element. )  
> ==\> default: STDERR:  
> ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe set  
> config -section:system.we  
> bServer/handlers  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> TE" /commit:apphost ----  
> ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> -section:system.webServer/handler  
> s  
> /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> /commit:ap  
> phost returned 4312  
> Chef never successfully completed! Any errors should be visible in the  
> output above. Please fix your recipes so that they properly complete.
> 
> --
> 
> Kenneth Barry  
> TuneIn | Build and Release Engineer  
> M: 409-673-0544  
> [www.tunein.com](http://www.tunein.com)

--  
Galen Emery — Automation Engineer

425.341.3619 – [galen@getchef.com](mailto:galen@getchef.com) my: _Linkedin  
 [https://www.linkedin.com/in/gemery](https://www.linkedin.com/in/gemery)_ Twitter  
[http://www.twitter.com/galen\_emery](http://www.twitter.com/galen_emery)

CHEF

TM

> **[Chef Software DevOps Automation Solutions | Chef](https://www.chef.io/)**
>
> Chef Software's DevOps automation tools enable the coded enterprise to overcome complexity with infrastructure, security and application automation for your technology.

[https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F)

Blog  
[https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F)  
Facebook  
[https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom)  
Twitter [https://twitter.com/chef](https://twitter.com/chef) Youtube  
[https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef)  
Check out some videos from #ChefConf 2014  
[https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA](https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA)

---

<div class="post-metadata">

**Author:** ![Kenneth\_Barry1](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kenneth\_Barry1](https://discourse.chef.io/u/Kenneth_Barry1)\
**Post date:** [November 14, 2014, 7:44pm UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934/3 "2014-11-14T19:44:57Z")

</div>

I like the idea. Honestly, I hadn't tried re-running it.  
First, I will move it to the last command,  
Then test, and re-run if neccessary.

On Fri, Nov 14, 2014 at 10:08 AM, Galen Emery [galen@getchef.com](mailto:galen@getchef.com) wrote:

> Kenneth,
> 
> What happens if you re-run the chef-client? Here's an old ticket that  
> implies this may be a timing issue:  
> [https://tickets.opscode.com/browse/COOK-4214](https://tickets.opscode.com/browse/COOK-4214)
> 
> On Thu, Nov 13, 2014 at 8:57 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:
> 
> > If i run the following from the cmd prompt in windows, it works just fine:
> > 
> > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > -section:system.webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > /commit:apphost
> > 
> > I have a iis\_config resource block. Getting an error, indicating my  
> > syntax is incorrect. But note what the error says was run:
> > 
> > ==\> default: Ran  
> > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > -section:system.webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > /commit:apphost returned 4312
> > 
> > what gives?  
> > The provider uses cmd, and I am assuming that means, "just as if you were  
> > to open the cmd prompt in windows"
> > 
> > FYI I get a similar error when trying the above command while in a  
> > powershell prompt.
> > 
> > Full error below:
> > 
> > # ==\> default:
> > 
> > # ==\> default: Error executing action `config` on resource 'iis\_config[-section:system.webServer/handl ers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit: apphost]' ==\> default:
> > 
> > ==\> default: Mixlib::ShellOut::ShellCommandFailed  
> > ==\> default: ------------------------------------  
> > ==\> default: Expected process to exit with [0, 183], but received '4312'  
> > ==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
> > set config -section:system.  
> > webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > LETE" /commit:apphost ----  
> > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > element. )  
> > ==\> default: STDERR:  
> > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > set config -section:system.we  
> > bServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > TE" /commit:apphost ----  
> > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > -section:system.webServer/handler  
> > s  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > /commit:ap  
> > phost returned 4312  
> > ==\> default:  
> > ==\> default: Resource Declaration:  
> > ==\> default: ---------------------  
> > ==\> default: # In  
> > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb  
> > ==\> default:  
> > ==\> default: 119: iis\_config cmd do  
> > ==\> default: 120: action :config  
> > ==\> default: 121: end  
> > ==\> default: 122: end  
> > ==\> default:  
> > ==\> default: Compiled Resource:  
> > ==\> default: ------------------  
> > ==\> default: # Declared in  
> > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i  
> > n from\_file'  
> > ==\> default:  
> > ==\> default: iis\_config("-section:system.webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrat  
> > ed-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost") do  
> > ==\> default: action [:config]  
> > ==\> default: retries 0  
> > ==\> default: retry\_delay 2  
> > ==\> default: cookbook\_name "tunein-iis"  
> > ==\> default: recipe\_name "default"  
> > ==\> default: cfg\_cmd "-section:system.webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrate  
> > d-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost"  
> > ==\> default: returns [0, 183]  
> > ==\> default: end  
> > ==\> default:  
> > ==\> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed  
> > notifications before re-raisin  
> > g exception  
> > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception handlers  
> > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers  
> > complete  
> > ==\> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to  
> > C:/var/chef/cache/chef-stacktra  
> > ce.out  
> > ==\> default: [2014-11-13T22:22:03-06:00] FATAL:  
> > Mixlib::ShellOut::ShellCommandFailed: iis\_config[-se  
> > ction:system.webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST  
> > ,DEBUG,PUT,DELETE" /commit:apphost] (tunein-iis::default line 119) had  
> > an error: Mixlib::ShellOut::  
> > ShellCommandFailed: Expected process to exit with [0, 183], but received  
> > '4312'  
> > ==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
> > set config -section:system.  
> > webServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > LETE" /commit:apphost ----  
> > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > element. )  
> > ==\> default: STDERR:  
> > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > set config -section:system.we  
> > bServer/handlers  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > TE" /commit:apphost ----  
> > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > -section:system.webServer/handler  
> > s  
> > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > /commit:ap  
> > phost returned 4312  
> > Chef never successfully completed! Any errors should be visible in the  
> > output above. Please fix your recipes so that they properly complete.
> > 
> > --
> > 
> > Kenneth Barry  
> > TuneIn | Build and Release Engineer  
> > M: 409-673-0544  
> > [www.tunein.com](http://www.tunein.com)
> 
> --  
> Galen Emery — Automation Engineer
> 
> 425.341.3619 – [galen@getchef.com](mailto:galen@getchef.com) my: _Linkedin  
> [https://www.linkedin.com/in/gemery](https://www.linkedin.com/in/gemery)_ Twitter  
> [http://www.twitter.com/galen\_emery](http://www.twitter.com/galen_emery)
> 
> CHEF
> 
> TM
> 
> [GETCHEF.COM](http://GETCHEF.COM)  
> [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F)
> 
> Blog  
> [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F)  
> Facebook  
> [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom)  
> Twitter [https://twitter.com/chef](https://twitter.com/chef) Youtube  
> [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef)  
> Check out some videos from #ChefConf 2014  
> [https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA](https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA)

--

Kenneth Barry  
TuneIn | Build and Release Engineer  
M: 409-673-0544

> **[TuneIn | Free Internet Radio | Live News, Sports, Music, Audiobooks, and...](https://tunein.com/)**
>
> Listen to free internet radio, news, sports, music, audiobooks, and podcasts. Stream live CNN, FOX News Radio, and MSNBC. Plus 100,000 AM/FM radio stations featuring music, news, and local sports talk.

---

<div class="post-metadata">

**Author:** ![Kenneth\_Barry1](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kenneth\_Barry1](https://discourse.chef.io/u/Kenneth_Barry1)\
**Post date:** [November 14, 2014, 11:11pm UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934/4 "2014-11-14T23:11:49Z")

</div>

No dice.  
Repeating the chef run doesn't help.

On Fri, Nov 14, 2014 at 11:44 AM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:

> I like the idea. Honestly, I hadn't tried re-running it.  
> First, I will move it to the last command,  
> Then test, and re-run if neccessary.
> 
> On Fri, Nov 14, 2014 at 10:08 AM, Galen Emery [galen@getchef.com](mailto:galen@getchef.com) wrote:
> 
> > Kenneth,
> > 
> > What happens if you re-run the chef-client? Here's an old ticket that  
> > implies this may be a timing issue:  
> > [https://tickets.opscode.com/browse/COOK-4214](https://tickets.opscode.com/browse/COOK-4214)
> > 
> > On Thu, Nov 13, 2014 at 8:57 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:
> > 
> > > If i run the following from the cmd prompt in windows, it works just  
> > > fine:
> > > 
> > > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > -section:system.webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > /commit:apphost
> > > 
> > > I have a iis\_config resource block. Getting an error, indicating my  
> > > syntax is incorrect. But note what the error says was run:
> > > 
> > > ==\> default: Ran  
> > > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > -section:system.webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > /commit:apphost returned 4312
> > > 
> > > what gives?  
> > > The provider uses cmd, and I am assuming that means, "just as if you  
> > > were to open the cmd prompt in windows"
> > > 
> > > FYI I get a similar error when trying the above command while in a  
> > > powershell prompt.
> > > 
> > > Full error below:
> > > 
> > > # ==\> default:
> > > 
> > > # ==\> default: Error executing action `config` on resource 'iis\_config[-section:system.webServer/handl ers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit: apphost]' ==\> default:
> > > 
> > > ==\> default: Mixlib::ShellOut::ShellCommandFailed  
> > > ==\> default: ------------------------------------  
> > > ==\> default: Expected process to exit with [0, 183], but received '4312'  
> > > ==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > set config -section:system.  
> > > webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > > LETE" /commit:apphost ----  
> > > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > > element. )  
> > > ==\> default: STDERR:  
> > > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > set config -section:system.we  
> > > bServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > > TE" /commit:apphost ----  
> > > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > -section:system.webServer/handler  
> > > s  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > /commit:ap  
> > > phost returned 4312  
> > > ==\> default:  
> > > ==\> default: Resource Declaration:  
> > > ==\> default: ---------------------  
> > > ==\> default: # In  
> > > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb  
> > > ==\> default:  
> > > ==\> default: 119: iis\_config cmd do  
> > > ==\> default: 120: action :config  
> > > ==\> default: 121: end  
> > > ==\> default: 122: end  
> > > ==\> default:  
> > > ==\> default: Compiled Resource:  
> > > ==\> default: ------------------  
> > > ==\> default: # Declared in  
> > > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i  
> > > n from\_file'  
> > > ==\> default:  
> > > ==\> default: iis\_config("-section:system.webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrat  
> > > ed-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost") do  
> > > ==\> default: action [:config]  
> > > ==\> default: retries 0  
> > > ==\> default: retry\_delay 2  
> > > ==\> default: cookbook\_name "tunein-iis"  
> > > ==\> default: recipe\_name "default"  
> > > ==\> default: cfg\_cmd "-section:system.webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrate  
> > > d-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost"  
> > > ==\> default: returns [0, 183]  
> > > ==\> default: end  
> > > ==\> default:  
> > > ==\> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed  
> > > notifications before re-raisin  
> > > g exception  
> > > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception  
> > > handlers  
> > > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers  
> > > complete  
> > > ==\> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to  
> > > C:/var/chef/cache/chef-stacktra  
> > > ce.out  
> > > ==\> default: [2014-11-13T22:22:03-06:00] FATAL:  
> > > Mixlib::ShellOut::ShellCommandFailed: iis\_config[-se  
> > > ction:system.webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST  
> > > ,DEBUG,PUT,DELETE" /commit:apphost] (tunein-iis::default line 119) had  
> > > an error: Mixlib::ShellOut::  
> > > ShellCommandFailed: Expected process to exit with [0, 183], but received  
> > > '4312'  
> > > ==\> default: ---- Begin output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > set config -section:system.  
> > > webServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > > LETE" /commit:apphost ----  
> > > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > > element. )  
> > > ==\> default: STDERR:  
> > > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > set config -section:system.we  
> > > bServer/handlers  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > > TE" /commit:apphost ----  
> > > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > -section:system.webServer/handler  
> > > s  
> > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > /commit:ap  
> > > phost returned 4312  
> > > Chef never successfully completed! Any errors should be visible in the  
> > > output above. Please fix your recipes so that they properly complete.
> > > 
> > > --
> > > 
> > > Kenneth Barry  
> > > TuneIn | Build and Release Engineer  
> > > M: 409-673-0544  
> > > [www.tunein.com](http://www.tunein.com)
> > 
> > --  
> > Galen Emery — Automation Engineer
> > 
> > 425.341.3619 – [galen@getchef.com](mailto:galen@getchef.com) my: _Linkedin  
> > [https://www.linkedin.com/in/gemery](https://www.linkedin.com/in/gemery)_ Twitter  
> > [http://www.twitter.com/galen\_emery](http://www.twitter.com/galen_emery)
> > 
> > CHEF
> > 
> > TM
> > 
> > [GETCHEF.COM](http://GETCHEF.COM)  
> > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F)
> > 
> > Blog  
> > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F)  
> > Facebook  
> > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom)  
> > Twitter [https://twitter.com/chef](https://twitter.com/chef) Youtube  
> > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef)  
> > Check out some videos from #ChefConf 2014  
> > [https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA](https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA)
> 
> --
> 
> Kenneth Barry  
> TuneIn | Build and Release Engineer  
> M: 409-673-0544  
> [www.tunein.com](http://www.tunein.com)

--

Kenneth Barry  
TuneIn | Build and Release Engineer  
M: 409-673-0544

> **[TuneIn | Free Internet Radio | Live News, Sports, Music, Audiobooks, and...](https://tunein.com/)**
>
> Listen to free internet radio, news, sports, music, audiobooks, and podcasts. Stream live CNN, FOX News Radio, and MSNBC. Plus 100,000 AM/FM radio stations featuring music, news, and local sports talk.

---

<div class="post-metadata">

**Author:** ![Peter\_Burkholder1](https://avatars.discourse-cdn.com/v4/letter/p/7ea924/32.png) [@Peter\_Burkholder1](https://discourse.chef.io/u/Peter_Burkholder1)\
**Post date:** [November 16, 2014, 5:15pm UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934/5 "2014-11-16T17:15:03Z")

</div>

Kenneth,

Have you looked up what 4312 return code is?  
Have you run chef-client with '-l debug'? The iis cookbook should log the  
iis\_config cmd prior to the shell\_out.  
What error do you get with PowerShell?

--Peter

On Fri, Nov 14, 2014 at 6:11 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:

> No dice.  
> Repeating the chef run doesn't help.
> 
> On Fri, Nov 14, 2014 at 11:44 AM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:
> 
> > I like the idea. Honestly, I hadn't tried re-running it.  
> > First, I will move it to the last command,  
> > Then test, and re-run if neccessary.
> > 
> > On Fri, Nov 14, 2014 at 10:08 AM, Galen Emery [galen@getchef.com](mailto:galen@getchef.com) wrote:
> > 
> > > Kenneth,
> > > 
> > > What happens if you re-run the chef-client? Here's an old ticket that  
> > > implies this may be a timing issue:  
> > > [https://tickets.opscode.com/browse/COOK-4214](https://tickets.opscode.com/browse/COOK-4214)
> > > 
> > > On Thu, Nov 13, 2014 at 8:57 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com)  
> > > wrote:
> > > 
> > > > If i run the following from the cmd prompt in windows, it works just  
> > > > fine:
> > > > 
> > > > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > -section:system.webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > /commit:apphost
> > > > 
> > > > I have a iis\_config resource block. Getting an error, indicating my  
> > > > syntax is incorrect. But note what the error says was run:
> > > > 
> > > > ==\> default: Ran  
> > > > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > -section:system.webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > /commit:apphost returned 4312
> > > > 
> > > > what gives?  
> > > > The provider uses cmd, and I am assuming that means, "just as if you  
> > > > were to open the cmd prompt in windows"
> > > > 
> > > > FYI I get a similar error when trying the above command while in a  
> > > > powershell prompt.
> > > > 
> > > > Full error below:
> > > > 
> > > > # ==\> default:
> > > > 
> > > > # ==\> default: Error executing action `config` on resource 'iis\_config[-section:system.webServer/handl ers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit: apphost]' ==\> default:
> > > > 
> > > > ==\> default: Mixlib::ShellOut::ShellCommandFailed  
> > > > ==\> default: ------------------------------------  
> > > > ==\> default: Expected process to exit with [0, 183], but received '4312'  
> > > > ==\> default: ---- Begin output of  
> > > > C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.  
> > > > webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > > > LETE" /commit:apphost ----  
> > > > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > > > element. )  
> > > > ==\> default: STDERR:  
> > > > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > > set config -section:system.we  
> > > > bServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > > > TE" /commit:apphost ----  
> > > > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > -section:system.webServer/handler  
> > > > s  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > /commit:ap  
> > > > phost returned 4312  
> > > > ==\> default:  
> > > > ==\> default: Resource Declaration:  
> > > > ==\> default: ---------------------  
> > > > ==\> default: # In  
> > > > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb  
> > > > ==\> default:  
> > > > ==\> default: 119: iis\_config cmd do  
> > > > ==\> default: 120: action :config  
> > > > ==\> default: 121: end  
> > > > ==\> default: 122: end  
> > > > ==\> default:  
> > > > ==\> default: Compiled Resource:  
> > > > ==\> default: ------------------  
> > > > ==\> default: # Declared in  
> > > > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i  
> > > > n from\_file'  
> > > > ==\> default:  
> > > > ==\> default: iis\_config("-section:system.webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrat  
> > > > ed-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost") do  
> > > > ==\> default: action [:config]  
> > > > ==\> default: retries 0  
> > > > ==\> default: retry\_delay 2  
> > > > ==\> default: cookbook\_name "tunein-iis"  
> > > > ==\> default: recipe\_name "default"  
> > > > ==\> default: cfg\_cmd "-section:system.webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrate  
> > > > d-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost"  
> > > > ==\> default: returns [0, 183]  
> > > > ==\> default: end  
> > > > ==\> default:  
> > > > ==\> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed  
> > > > notifications before re-raisin  
> > > > g exception  
> > > > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception  
> > > > handlers  
> > > > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers  
> > > > complete  
> > > > ==\> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to  
> > > > C:/var/chef/cache/chef-stacktra  
> > > > ce.out  
> > > > ==\> default: [2014-11-13T22:22:03-06:00] FATAL:  
> > > > Mixlib::ShellOut::ShellCommandFailed: iis\_config[-se  
> > > > ction:system.webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST  
> > > > ,DEBUG,PUT,DELETE" /commit:apphost] (tunein-iis::default line 119) had  
> > > > an error: Mixlib::ShellOut::  
> > > > ShellCommandFailed: Expected process to exit with [0, 183], but  
> > > > received '4312'  
> > > > ==\> default: ---- Begin output of  
> > > > C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.  
> > > > webServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > > > LETE" /commit:apphost ----  
> > > > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > > > element. )  
> > > > ==\> default: STDERR:  
> > > > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > > set config -section:system.we  
> > > > bServer/handlers  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > > > TE" /commit:apphost ----  
> > > > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > -section:system.webServer/handler  
> > > > s  
> > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > /commit:ap  
> > > > phost returned 4312  
> > > > Chef never successfully completed! Any errors should be visible in the  
> > > > output above. Please fix your recipes so that they properly complete.
> > > > 
> > > > --
> > > > 
> > > > Kenneth Barry  
> > > > TuneIn | Build and Release Engineer  
> > > > M: 409-673-0544  
> > > > [www.tunein.com](http://www.tunein.com)
> > > 
> > > --  
> > > Galen Emery — Automation Engineer
> > > 
> > > 425.341.3619 – [galen@getchef.com](mailto:galen@getchef.com) my: _Linkedin  
> > > [https://www.linkedin.com/in/gemery](https://www.linkedin.com/in/gemery)_ Twitter  
> > > [http://www.twitter.com/galen\_emery](http://www.twitter.com/galen_emery)
> > > 
> > > CHEF
> > > 
> > > TM
> > > 
> > > [GETCHEF.COM](http://GETCHEF.COM)  
> > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F)
> > > 
> > > Blog  
> > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F)  
> > > Facebook  
> > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom)  
> > > Twitter [https://twitter.com/chef](https://twitter.com/chef) Youtube  
> > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef)  
> > > Check out some videos from #ChefConf 2014  
> > > [https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA](https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA)
> > 
> > --
> > 
> > Kenneth Barry  
> > TuneIn | Build and Release Engineer  
> > M: 409-673-0544  
> > [www.tunein.com](http://www.tunein.com)
> 
> --
> 
> Kenneth Barry  
> TuneIn | Build and Release Engineer  
> M: 409-673-0544  
> [www.tunein.com](http://www.tunein.com)

---

<div class="post-metadata">

**Author:** ![Kenneth\_Barry1](https://avatars.discourse-cdn.com/v4/letter/k/cc9497/32.png) [@Kenneth\_Barry1](https://discourse.chef.io/u/Kenneth_Barry1)\
**Post date:** [November 17, 2014, 3:35pm UTC](https://discourse.chef.io/t/iis-cookbook-trouble/5934/6 "2014-11-17T15:35:56Z")

</div>

Great questions.  
4312 is the error you get when appcmd can't find the sections of schema  
that your refereing to in your command.  
So, if you get everything correct, but fat fingered the "where" of it all,  
you get a 4312.  
I have not run with -l debug, I assumed the "Ran ....." line was  
sufficient, i'll debug and see if I get something different.

I'll have to test and see what error i get with Powershell, but I know part  
of the problem is that Powershell is unwrapping some of the quotations (as  
it will), so I get a "you didn't form the command properly" error.(I'm  
making that error verbage up) I believe it is something like "malformed  
indexer"

On Sun, Nov 16, 2014 at 9:15 AM, Peter Burkholder [pburkholder@getchef.com](mailto:pburkholder@getchef.com)  
wrote:

> Kenneth,
> 
> Have you looked up what 4312 return code is?  
> Have you run chef-client with '-l debug'? The iis cookbook should log the  
> iis\_config cmd prior to the shell\_out.  
> What error do you get with PowerShell?
> 
> --Peter
> 
> On Fri, Nov 14, 2014 at 6:11 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com) wrote:
> 
> > No dice.  
> > Repeating the chef run doesn't help.
> > 
> > On Fri, Nov 14, 2014 at 11:44 AM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com)  
> > wrote:
> > 
> > > I like the idea. Honestly, I hadn't tried re-running it.  
> > > First, I will move it to the last command,  
> > > Then test, and re-run if neccessary.
> > > 
> > > On Fri, Nov 14, 2014 at 10:08 AM, Galen Emery [galen@getchef.com](mailto:galen@getchef.com) wrote:
> > > 
> > > > Kenneth,
> > > > 
> > > > What happens if you re-run the chef-client? Here's an old ticket that  
> > > > implies this may be a timing issue:  
> > > > [https://tickets.opscode.com/browse/COOK-4214](https://tickets.opscode.com/browse/COOK-4214)
> > > > 
> > > > On Thu, Nov 13, 2014 at 8:57 PM, Kenneth Barry [kbarry@tunein.com](mailto:kbarry@tunein.com)  
> > > > wrote:
> > > > 
> > > > > If i run the following from the cmd prompt in windows, it works just  
> > > > > fine:
> > > > > 
> > > > > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > > -section:system.webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > > /commit:apphost
> > > > > 
> > > > > I have a iis\_config resource block. Getting an error, indicating my  
> > > > > syntax is incorrect. But note what the error says was run:
> > > > > 
> > > > > ==\> default: Ran  
> > > > > C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > > -section:system.webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > > /commit:apphost returned 4312
> > > > > 
> > > > > what gives?  
> > > > > The provider uses cmd, and I am assuming that means, "just as if you  
> > > > > were to open the cmd prompt in windows"
> > > > > 
> > > > > FYI I get a similar error when trying the above command while in a  
> > > > > powershell prompt.
> > > > > 
> > > > > Full error below:
> > > > > 
> > > > > # ==\> default:
> > > > > 
> > > > > # ==\> default: Error executing action `config` on resource 'iis\_config[-section:system.webServer/handl ers /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit: apphost]' ==\> default:
> > > > > 
> > > > > ==\> default: Mixlib::ShellOut::ShellCommandFailed  
> > > > > ==\> default: ------------------------------------  
> > > > > ==\> default: Expected process to exit with [0, 183], but received  
> > > > > '4312'  
> > > > > ==\> default: ---- Begin output of  
> > > > > C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.  
> > > > > webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > > > > LETE" /commit:apphost ----  
> > > > > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > > > > element. )  
> > > > > ==\> default: STDERR:  
> > > > > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > > > set config -section:system.we  
> > > > > bServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > > > > TE" /commit:apphost ----  
> > > > > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > > -section:system.webServer/handler  
> > > > > s  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > > /commit:ap  
> > > > > phost returned 4312  
> > > > > ==\> default:  
> > > > > ==\> default: Resource Declaration:  
> > > > > ==\> default: ---------------------  
> > > > > ==\> default: # In  
> > > > > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb  
> > > > > ==\> default:  
> > > > > ==\> default: 119: iis\_config cmd do  
> > > > > ==\> default: 120: action :config  
> > > > > ==\> default: 121: end  
> > > > > ==\> default: 122: end  
> > > > > ==\> default:  
> > > > > ==\> default: Compiled Resource:  
> > > > > ==\> default: ------------------  
> > > > > ==\> default: # Declared in  
> > > > > C:/var/chef/cache/cookbooks/tunein-iis/recipes/default.rb:119:in `block i  
> > > > > n from\_file'  
> > > > > ==\> default:  
> > > > > ==\> default: iis\_config("-section:system.webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrat  
> > > > > ed-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost") do  
> > > > > ==\> default: action [:config]  
> > > > > ==\> default: retries 0  
> > > > > ==\> default: retry\_delay 2  
> > > > > ==\> default: cookbook\_name "tunein-iis"  
> > > > > ==\> default: recipe\_name "default"  
> > > > > ==\> default: cfg\_cmd "-section:system.webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrate  
> > > > > d-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE" /commit:apphost"  
> > > > > ==\> default: returns [0, 183]  
> > > > > ==\> default: end  
> > > > > ==\> default:  
> > > > > ==\> default: [2014-11-13T22:22:03-06:00] INFO: Running queued delayed  
> > > > > notifications before re-raisin  
> > > > > g exception  
> > > > > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Running exception  
> > > > > handlers  
> > > > > ==\> default: [2014-11-13T22:22:03-06:00] ERROR: Exception handlers  
> > > > > complete  
> > > > > ==\> default: [2014-11-13T22:22:03-06:00] FATAL: Stacktrace dumped to  
> > > > > C:/var/chef/cache/chef-stacktra  
> > > > > ce.out  
> > > > > ==\> default: [2014-11-13T22:22:03-06:00] FATAL:  
> > > > > Mixlib::ShellOut::ShellCommandFailed: iis\_config[-se  
> > > > > ction:system.webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST  
> > > > > ,DEBUG,PUT,DELETE" /commit:apphost] (tunein-iis::default line 119)  
> > > > > had an error: Mixlib::ShellOut::  
> > > > > ShellCommandFailed: Expected process to exit with [0, 183], but  
> > > > > received '4312'  
> > > > > ==\> default: ---- Begin output of  
> > > > > C:\Windows\System32\inetsrv\appcmd.exe set config -section:system.  
> > > > > webServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DE  
> > > > > LETE" /commit:apphost ----  
> > > > > ==\> default: STDOUT: ERROR ( message:Cannot find requested collection  
> > > > > element. )  
> > > > > ==\> default: STDERR:  
> > > > > ==\> default: ---- End output of C:\Windows\System32\inetsrv\appcmd.exe  
> > > > > set config -section:system.we  
> > > > > bServer/handlers  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELE  
> > > > > TE" /commit:apphost ----  
> > > > > ==\> default: Ran C:\Windows\System32\inetsrv\appcmd.exe set config  
> > > > > -section:system.webServer/handler  
> > > > > s  
> > > > > /[name='ExtensionlessUrlHandler-Integrated-4.0'].verb:"GET,HEAD,POST,DEBUG,PUT,DELETE"  
> > > > > /commit:ap  
> > > > > phost returned 4312  
> > > > > Chef never successfully completed! Any errors should be visible in the  
> > > > > output above. Please fix your recipes so that they properly complete.
> > > > > 
> > > > > --
> > > > > 
> > > > > Kenneth Barry  
> > > > > TuneIn | Build and Release Engineer  
> > > > > M: 409-673-0544  
> > > > > [www.tunein.com](http://www.tunein.com)
> > > > 
> > > > --  
> > > > Galen Emery — Automation Engineer
> > > > 
> > > > 425.341.3619 – [galen@getchef.com](mailto:galen@getchef.com) my: _Linkedin  
> > > > [https://www.linkedin.com/in/gemery](https://www.linkedin.com/in/gemery)_ Twitter  
> > > > [http://www.twitter.com/galen\_emery](http://www.twitter.com/galen_emery)
> > > > 
> > > > CHEF
> > > > 
> > > > TM
> > > > 
> > > > [GETCHEF.COM](http://GETCHEF.COM)  
> > > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/ae649db7c07210ea32a5b85e88a4c254?ytl=http%3A%2F%2Fwww.getchef.com%2F)
> > > > 
> > > > Blog  
> > > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/7f97fd5d54b095e69ab2db7730a19361?ytl=http%3A%2F%2Fwww.getchef.com%2Fblog%2F)  
> > > > Facebook  
> > > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/79b4a7dcc9a3776f42f0c230394779a0?ytl=https%3A%2F%2Fwww.facebook.com%2Fgetchefdotcom)  
> > > > Twitter [https://twitter.com/chef](https://twitter.com/chef) Youtube  
> > > > [https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef](https://t.yesware.com/tl/fa4d128b44f15b1f6d3a08e3c3ba836326ce28ca/7963335485c64b73a77697a84b5671ed/8e5448001e916bf0317a4e59de1ba7a2?ytl=https%3A%2F%2Fwww.youtube.com%2Fgetchef)  
> > > > Check out some videos from #ChefConf 2014  
> > > > [https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA](https://www.youtube.com/playlist?list=PL11cZfNdwNyMmx0msapJfuGsLV43C7XsA)
> > > 
> > > --
> > > 
> > > Kenneth Barry  
> > > TuneIn | Build and Release Engineer  
> > > M: 409-673-0544  
> > > [www.tunein.com](http://www.tunein.com)
> > 
> > --
> > 
> > Kenneth Barry  
> > TuneIn | Build and Release Engineer  
> > M: 409-673-0544  
> > [www.tunein.com](http://www.tunein.com)

--

Kenneth Barry  
TuneIn | Build and Release Engineer  
M: 409-673-0544

> **[TuneIn | Free Internet Radio | Live News, Sports, Music, Audiobooks, and...](https://tunein.com/)**
>
> Listen to free internet radio, news, sports, music, audiobooks, and podcasts. Stream live CNN, FOX News Radio, and MSNBC. Plus 100,000 AM/FM radio stations featuring music, news, and local sports talk.
