Skip to content

Unable to add new element to a Collection #433

@ghost

Description

Cookbook version

7.1.0

Chef-client version

14.5.33

Platform Details

Windows Server 2012R2

Scenario:

Add an element to Collection under verbs in system.webServer/security/requestFiltering section

Equivalent PowerShell command:
Add-WebConfigurationProperty -pspath 'MACHINE/WEBROOT/APPHOST' -filter "system.webServer/security/requestFiltering/verbs" -name "." -value @{verb='TRACE';allowed='False'}

Steps to Reproduce:

Run this Recipe:

iis_config_property 'Add HTTP Trace Method' do
  ps_path   'MACHINE/WEBROOT/APPHOST'
  filter    'system.webServer/security/requestFiltering/verbs'
  property  'verb'
  value     'TRACE'
  action    :add
end
iis_config_property 'Set HTTP Trace Method to false' do
  ps_path   'MACHINE/WEBROOT/APPHOST'
  filter    "system.webServer/security/requestFiltering/verbs/add[@verb='TRACE']"
  property  'allowed'
  value     'false'
end

Expected Result:

Should add a new element (verb='TRACE',allowed='False' under verbs

Actual Result:

Error Log can be found here: errorlog

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions