-
-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unlock attribute within section #241
Comments
appcmd is able to do locking / unlocking. I'm not sure if this is the same unlocking that you are referring to. Eventually I'd like to add more of the appcmd commands. If appcmd unlock works the same as Remove-WebConfigurationLock it should be a pretty easy feature to add. |
@surrealchemist if this fixes it
then the chef code would be iis_section 'unlocks httpErrors for webserver' do
section 'system.webserver/httperrors'
action :unlock
end |
will be testing this soon |
@EasyAsABC123 Did you ever get a chance to test this issue? |
@tas50 i've been waiting for the original poster to respond. I wasn't able to replicate, but I suppose i can try to replicate again. |
Sorry I never replied. Unfortunately I am no longer working at the company where I was writing the playbook that used this so I'm not really able to test at this point myself. |
@surrealchemist no worries, thanks for reporting the issue. i'll work on replicating it locally for me. |
waiting until iis_section is on the block for re-write, at that time this will have tests |
This can be done with, test will be added soon...this isn't idempotent, closing issue iis_section 'unlocks httpErrors for webserver' do
section 'system.webserver/httperrors'
action :unlock
end
iis_config 'change @httpErrors' do
cfg_cmd '"MACHINE/WEBROOT/APPHOST/" -section:"system.webServer/httpErrors" -lockAttributes:"allowAbsolutePathsWhenDelegated" -commit:apphost'
action :set
end |
In some cases you may need to unlock an attribute (this is IIS configuration attribute I am talking about not chef attribute) within a section in the configuration editor, but I only see options to unlock a section.
For example, in my case I need to go into "system.webServer/httpErrors" and unlock the "defaultPath" attribute so the application can override it. It doesn't look like appcmd has a way to do it, but I found some powershell code that would allow me to do it (Not sure if this is included without installing anything extra):
Perhaps this would be a more efficient way to edit the global config than appcmd and allow for more features.
The text was updated successfully, but these errors were encountered: