XmlDocument doc = new XmlDocument();
doc.Load(webDiskPath + "Web.Config");
XmlNamespaceManager nsmgr = new XmlNamespaceManager(doc.NameTable);
nsmgr.AddNamespace("ab", "http://schemas.microsoft.com/.NetConfiguration/v2.0");
XmlNode xn = doc.SelectSingleNode("//ab:configuration/ab:system.web/ab:authorization",nsmgr);
XmlElement xe = doc.CreateElement("","allow","http://schemas.microsoft.com/.NetConfiguration/v2.0");
xe.SetAttribute("users", theUserName);
xn.AppendChild(xe);
xe = doc.CreateElement("", "deny", "http://schemas.microsoft.com/.NetConfiguration/v2.0");
xe.SetAttribute("users", "*");
xn.AppendChild(xe);
doc.Save(userWebDiskPath + "\\Web.Config");
![]() |
冬日娜刻薄提问雷哭史冬鹏(图)
孙悦是本届奥运的最大收获
程菲终于走出了失望(图)
|
![]() |
花样游泳姐妹花私家生活照 盘点北京奥运会十大悲情英雄(图) |
![]() |
![]() |
![]() |


档案
日志
相册
视频








评论
想第一时间抢沙发么?