开发者

Removing Entries Created SPModification for Non-Default Zone

开发者 https://www.devze.com 2022-12-20 13:59 出处:网络
It is a well known issues that SPModification only removes entries from the default zone. What a开发者_Go百科re people using as a work around. I\'m implementing something and I\'d like to know how oth

It is a well known issues that SPModification only removes entries from the default zone. What a开发者_Go百科re people using as a work around. I'm implementing something and I'd like to know how others are working around this issue.


Never had to use it (knew the issue tho) and in my book it is a combination of 2 techniques:

1- Opening the web.config based on the SPWebApplication (see AlternateUrls property for additional zones)

SPWebApplication webApp = (SPWebApplication)properties.Parent;
Configuration webconfig = WebConfigurationManager.OpenWebConfiguration("/", webApp.Name);

2- Using good ol' XmlDocument manipulation with XPath and friends

0

精彩评论

暂无评论...
验证码 换一张
取 消