As I understand it, these are functionally (almost?) equivalent:
appcmd set config /section:httpProtocol /+customHeaders.[name='P3P',value='policyRef=""" http://contoso.com/P3P.xml """'] appcmd set config "MyWebsiteName" /section:httpProtocol /+customHeaders.[name='P3P',value='policyRef=""" http://contoso.com/P3P.xml """']
in the first one, what goes on when there are MANY sites on the server?
NOTE: perhaps httpProtocol is a bad example, because it might just "fall up" into applicationHost.config if there are no "deeper" settings... but hopefully you understand where I'm coming from and can inform me how this tool determines where stuff goes...
I ask because much of the doco leaves out the website name/id and I wonder if this is an assumption that there will only ever be one SITE per SERVER to apply these changes or if the assumption is that mostly the place where these things are set is in appconfig and so this is where the "ommitted" value goes (to the first place it finds that setting).
Of course I could be wrong and omitting might SEARCH ALL OBJECTS in the server and replace EVERY set value to this new operation...
eg: in the above, every web.config that has a "httpProtocol section will get this item added...
Any info appreciated. Thanks.