示例#1
0
 public IisVirtualDirectoryOptions DisableAllAuthenticationBut(IISAuthenticationMode enabledAuthenticationType)
 {
     foreach (IISAuthenticationMode mode in Enum.GetValues(typeof(IISAuthenticationMode)))
     {
         AuthenticationToSet.Add(mode, mode == enabledAuthenticationType);
     }
     return(this);
 }
示例#2
0
 public IisVirtualDirectoryOptions SetAuthentication(IISAuthenticationMode authenticationType, bool enabled)
 {
     if (AuthenticationToSet.ContainsKey(authenticationType))
     {
         AuthenticationToSet[authenticationType] = enabled;
     }
     else
     {
         AuthenticationToSet.Add(authenticationType, enabled);
     }
     return(this);
 }
示例#3
0
 public static void SetAuthenticationMode(DirectoryEntry siteOrVDir, IISAuthenticationMode authMode)
 {
     SetProperty(siteOrVDir, "AuthFlags", (int)authMode);
 }
示例#4
0
        public static void SetAuthenticationMode(string serverName, int siteID, string appVDir, IISAuthenticationMode authMode)
        {
            DirectoryEntry app = GetVDir(serverName, siteID, appVDir);

            SetAuthenticationMode(app, authMode);
        }
示例#5
0
 public static void SetAuthenticationMode(DirectoryEntry siteOrVDir, IISAuthenticationMode authMode)
 {
     SetProperty(siteOrVDir, "AuthFlags", (int)authMode);
 }
示例#6
0
 public static void SetAuthenticationMode(string serverName, int siteID, string appVDir, IISAuthenticationMode authMode)
 {
     DirectoryEntry app = GetVDir(serverName, siteID, appVDir);
     SetAuthenticationMode(app, authMode);
 }
示例#7
0
 public IisVirtualDirectoryOptions DisableAllAuthenticationBut(IISAuthenticationMode enabledAuthenticationType) {
    foreach(IISAuthenticationMode mode in Enum.GetValues(typeof(IISAuthenticationMode))) {
       AuthenticationToSet.Add(mode, mode == enabledAuthenticationType);
    }
    return this;
 }
示例#8
0
 public IisVirtualDirectoryOptions SetAuthentication(IISAuthenticationMode authenticationType, bool enabled) {
    if(AuthenticationToSet.ContainsKey(authenticationType)) { AuthenticationToSet[authenticationType] = enabled; } else {
       AuthenticationToSet.Add(authenticationType, enabled);
    }
    return this;
 }