-
Notifications
You must be signed in to change notification settings - Fork 150
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
xWebConfigPropertyLocation - For the ability to modify locked config sections #401
Comments
@geoffguynn Thanks for opening the issue. xIisFeatureDelegation is an option for unlocking config sections, but in cases where that is not a viable option, I can see the value in using the Location parameter. However, I don't think we should have redundant resources to add one parameter because that would be a lot duplicate code. We've introduced breaking changes in the past and it would just be documented and the major version number of the module would increment. For users who did not want to use Location tag, they would need to start proviging an empty string as the value for that setting in their configurations. Otherwise, I think we should be able to incorprate Location into resources like xWebConfigProperty and xWebConfigPropertyCollection as breaking changes. @johlju any issues introducing a breaking change to add a new Key property to xWebConfigProperty? |
It is not an issue to introduce breaking changes as long as it improves the resource. Agree that in this case it is needed to not introduce duplicated code. Sometimes it’s not possible to see every aspect of a resource when it’s first created, so breaking changes is inevitable to improve the resource module. |
Curious, what is “location” in this case? I haven’t heard the term before so trying to learn :) What is a locked configuration section? Are the locked configuration sections known so we could have a |
Certain properties in the web.config are by default locked to a location tag in the xml of applicationhost.config My sample.ps1 for this resource shows one such property. When this happens, you can add a tag in the applicationhost.config called AllowOverride=True (which is not desirable from my customer's preference) or by specifying a location paremeter that tells the cmdlet to put the setting in a Location tag in the applicationhost.config |
I got some more spare time and did testing on the "blank parameter" suggestion. Here's what I came up with. When using location as a key param, the set, get, and test functions require it to be set mandatory, and by doing so, a blank string will not be accepted. The only way I was able to get it to work is to set a throwaway value of "None" and then filter for it when making the calls in the function. Is that an acceptable solution? |
I'm out of my depth here. @regedit32 can you help here? 🙂 |
To make it still a mandatory parameter, you would need to use the |
Description
xWebConfigPropertyLocation specifies the location parameter to Get-WebConfiguration so that modifications to locked config sections can be made.
Proposed properties
Special considerations or limitations
I considered extending xWebConfigProperty to include location, but from testing, the location would need to become a key property. This would break older uses of xWebConfigProperty by requiring an additional parameter be added.
If a property is to be written to the web.config, I believe location should not be used, hence why I generated a new resource for this specific purpose.
The text was updated successfully, but these errors were encountered: