创建虚拟目录的常用属性

类别:.NET开发 点击:0 评论:0 推荐:
private void UpdateDirInfo(DirectoryEntry de,VirtualDirectory vd)
  {
   
   de.Properties["AnonymousUserName"][0] = vd.AnonymousUserName;
   de.Properties["AnonymousUserPass"][0] = vd.AnonymousUserPass;
   de.Properties["AccessRead"][0] = vd.AccessRead;
   de.Properties["AccessExecute"][0] = vd.AccessExecute;
   de.Properties["AccessWrite"][0] = vd.AccessWrite;
   de.Properties["AuthBasic"][0] = vd.AuthBasic;
   de.Properties["AuthNTLM"][0] = vd.AuthNTLM;
   de.Properties["ContentIndexed"][0] = vd.ContentIndexed;
   de.Properties["EnableDefaultDoc"][0] = vd.EnableDefaultDoc;
   de.Properties["EnableDirBrowsing"][0] = vd.EnableDirBrowsing;
   de.Properties["AccessSSL"][0] = vd.AccessSSL;
   de.Properties["AccessScript"][0] = vd.AccessScript;
   de.Properties["DefaultDoc"][0] = vd.DefaultDoc;
   de.Properties["Path"][0] = vd.Path;
   de.Properties["AppIsolated"][0]=vd.Protection;
   de.Properties["DontLog"][0]=vd.Log;
   de.Properties["AccessSource"][0]=vd.AccessSource;
   de.CommitChanges();
  }

本文地址:http://com.8s8s.com/it/it43376.htm