首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c#控制iis 填写默认文档有关问题请问

2012-01-15 
c#控制iis填写默认文档问题请教DfDoc"sfsfsd.aspx";rootDir.Properties[DefaultDoc].Value DfDocroo

c#控制iis 填写默认文档问题请教
DfDoc="sfsfsd.aspx";
rootDir.Properties["DefaultDoc"].Value = DfDoc;
rootDir.CommitChanges();

这样可以写入iis

object[] array = new object[100];
ArrayList arl = new ArrayList();
arl.Add(DfDoc);
array = arl.ToArray();
rootDir.Properties["DefaultDoc"].AddRange(array);
rootDir.CommitChanges();

这样就不能写入了,也就是我想写入多个不可以,现在在测试所以用了DdDoc一个数据,如果一个可以插入,我在试多个

[解决办法]
rootDir.Properties["DefaultDoc"].Value = "index.htm,index.html,list.htm,list.html,default.aspx,default.htm,default.html";

这样就可以设置多个了,我在IIS6上面就这样做的

热点排行