一定要以数组保存哦 string HostName = "localhost"; string newSiteNum = "2"; string Path = String.F"localhost";ormat("IIS://{0}/w3svc/{1}/root",HostName,newSiteNum); DirectoryEntry root = new DirectoryEntry(Path);
NewWebSiteInfoAll newweb = new NewWebSiteInfoAll(); ArrayList arl = new ArrayList(); arl.Add(@".rem,D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll,1,GET,HEAD,POST,DEBUG"); arl.Add(@".asax,D:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\aspnet_isapi.dll,5,GET,HEAD,POST,DEBUG"); root.Properties["ScriptMaps"].Value = arl.ToArray(); root.CommitChanges(); 
|