.Net中如何操作IIS(源代码)[3]

[入库:2006年2月23日] [更新:2007年3月24日]

本文简介:

;  vd.EnableDirBrowsing = (bool)de.Properties["EnableDirBrowsing"][0];
   vd.AccessSSL = (bool)de.Properties["AccessSSL"][0];
   vd.AccessScript = (bool)de.Properties["AccessScript"][0];
   vd.Path = (string)de.Properties["Path"][0];
   vd.flag = 0;
   vd.DefaultDoc = (string)de.Properties["DefaultDoc"][0];
   tmpdirs.Add(vd.Name,vd);
   }
   }
   return tmpdirs;
  }
  
  }
  /// <summary>
  /// VirtualDirectory类
  /// </summary>
  public class VirtualDirectory
  {
   private bool _read,_execute,_script,_ssl,_write,_authbasic,_authntlm,_indexed,_endirbrow,_endefaultdoc;
   private string _ausername,_auserpass,_name,_path;
   private int _flag;
   private string _defaultdoc;
   /// <summary>
   /// 构造函数
   /// </summary>
   public VirtualDirectory()
   {
   SetValue();
   }
   public VirtualDirectory(string strVirDirName)
   {
   _name = strVirDirName;
   SetValue();
   }
   private void SetValue()
   {
   _read = true;_execute = false;_script = false;_ssl= false;_write=false;_authbasic=false;_authntlm=false;
   _indexed = false;_endirbrow=false;_endefaultdoc = false;
   _flag = 1;
   _defaultdoc = "default.htm,default.aspx,default.asp,index.htm";
   _path = "C:\\";
   _ausername = "";_auserpass ="";_name="";
   }
   ///<summary>
   ///定义属性,IISVirtualDir太多属性了
   ///我只搞了比较重要的一些,其它的大伙需要的自个加吧。
   ///</summary>
  
   public int flag
   {
   get{ return _flag;}
   set{ _flag = value;}
   }
   public bool AccessRead
   {
   get{ return _read;}
   set{ _read = value;}
   }
   public bool AccessWrite
   {
   get{ return _write;}
   set{ _write = value;}
   }
   public bool AccessExecute
   {
   get{ return _execute;}
   set{ _execute = value;}
   }
   public bool AccessSSL
   {
   get{ return _ssl;}
   set{ _ssl = value;}
   }
   public bool AccessScript
   {
   get{ return _script;}
   set{ _script = value;}
   }
   public bool AuthBasic
   {
   get{ return _authbasic;}
   set{ _authbasic = value;}
   }
   public bool AuthNTLM
   {
   get{ return _authntlm;}
   set{ _authntlm = value;}
   }
   public bool ContentIndexed
   {
   get{ return _indexed;}
   set{ _indexed = value;}
   }
   public bool EnableDirBrowsing
   {
   get{ return _endirbrow;}
   set{ _endirbrow = value;}
   }
   public bool EnableDefaultDoc
   {
   get{ return _endefaultdoc;}
   set{ _endefaultdoc = value;}
   }
   public string Name
   {
   get{ return _name;}
   set{ _name = value;}
   }
   public string Path
   {
   get{ return _path;}
   set{ _path = value;}
   }
   public string DefaultDoc
   {
   get{ return _defaultdoc;}
   set{ _defaultdoc = value;}
   }
   public string AnonymousUserName
   {
   get{ return _ausername;}
   set{ _ausername = value;}
   }
   public string AnonymousUserPass
   {
   get{ return _auserpass;}
   set{ _auserpass = value;}
   }
  }
  /// <summary>
  /// 集合VirtualDirectories
  /// </summary>
  
  public c

本文关键:.Net中如何操作IIS(源代码)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top