当前位置:编程学习 > C#/ASP.NET >>

如何C#通过ServerManager类修改站点的匿名用户名和密码?

我用C#写了一个通过C#程序创建站点的功能,不知道
如何C#通过ServerManager类修改站点的匿名用户名和密码?
请指点 --------------------编程问答-------------------- 光问没有回答的 --------------------编程问答-------------------- DirectoryEntry  操作IIS --------------------编程问答-------------------- 终于有人回复了,win2008的操作DirectoryEntry会抛错 --------------------编程问答-------------------- 自力更生解决了。。。

Configuration config = mgr.GetApplicationHostConfiguration();
ConfigurationSection section = config.GetSection(
“system.webServer/security/authentication/anonymousAuthentication”);
section.SetAttributeValue(“userName”。。。

--------------------编程问答--------------------
引用 4 楼 renjie87892 的回复:
自力更生解决了。。。

Configuration config = mgr.GetApplicationHostConfiguration();
ConfigurationSection section = config.GetSection(
“system.webServer/security/authentication/anonymousAuthentication”);
se……


慢慢研究总有结果。学习了下。
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,