Пример #1
0
 internal void CommitMetabaseValues(ExchangeVirtualDirectory dataObject, ArrayList MetabasePropertiesToChange)
 {
     if (MetabasePropertiesToChange != null)
     {
         string metabasePath = dataObject.MetabasePath;
         Task.TaskErrorLoggingReThrowDelegate writeError = new Task.TaskErrorLoggingReThrowDelegate(this.WriteError);
         T dataObject2 = this.DataObject;
         using (DirectoryEntry directoryEntry = IisUtility.CreateIISDirectoryEntry(metabasePath, writeError, dataObject2.Identity))
         {
             IisUtility.SetProperties(directoryEntry, MetabasePropertiesToChange);
             directoryEntry.CommitChanges();
             IisUtility.CommitMetabaseChanges((dataObject.Server == null) ? null : dataObject.Server.Name);
         }
     }
 }
Пример #2
0
        protected void InternalValidateBasicLiveIdBasic()
        {
            T      dataObject   = this.DataObject;
            string metabasePath = dataObject.MetabasePath;

            Task.TaskErrorLoggingReThrowDelegate writeError = new Task.TaskErrorLoggingReThrowDelegate(this.WriteError);
            T dataObject2 = this.DataObject;

            using (DirectoryEntry directoryEntry = IisUtility.CreateIISDirectoryEntry(metabasePath, writeError, dataObject2.Identity))
            {
                T    dataObject3               = this.DataObject;
                bool?basicAuthentication       = dataObject3.BasicAuthentication;
                T    dataObject4               = this.DataObject;
                bool?liveIdBasicAuthentication = dataObject4.LiveIdBasicAuthentication;
                bool flag  = IisUtility.CheckForAuthenticationMethod(directoryEntry, AuthenticationMethodFlags.Basic);
                bool flag2 = this.CheckLiveIdBasicAuthModule(false);
                bool flag3 = basicAuthentication ?? flag;
                bool flag4 = liveIdBasicAuthentication ?? flag2;
                if (flag3 && flag4)
                {
                    string   format      = "Enabling both Basic and LiveIdBasic Authentication is not allowed. Virtual directory '{0}' has Basic={1}, LiveIdBasic={2}";
                    object[] array       = new object[3];
                    object[] array2      = array;
                    int      num         = 0;
                    T        dataObject5 = this.DataObject;
                    array2[num] = dataObject5.MetabasePath;
                    array[1]    = flag.ToString();
                    array[2]    = flag2.ToString();
                    TaskLogger.Trace(format, array);
                    T             dataObject6 = this.DataObject;
                    Exception     exception   = new LocalizedException(Strings.ErrorBasicAndLiveIdBasicNotAllowedVDir(dataObject6.MetabasePath, flag.ToString(), flag2.ToString()));
                    ErrorCategory category    = ErrorCategory.InvalidOperation;
                    T             dataObject7 = this.DataObject;
                    base.WriteError(exception, category, dataObject7.Identity);
                }
            }
        }
Пример #3
0
        protected void InternalValidateBasicLiveIdBasic()
        {
            T      dataObject   = this.DataObject;
            string metabasePath = dataObject.MetabasePath;

            Task.TaskErrorLoggingReThrowDelegate writeError = new Task.TaskErrorLoggingReThrowDelegate(this.WriteError);
            T dataObject2 = this.DataObject;

            using (IisUtility.CreateIISDirectoryEntry(metabasePath, writeError, dataObject2.Identity))
            {
                T    dataObject3 = this.DataObject;
                bool flag        = dataObject3.BasicAuthentication ?? false;
                T    dataObject4 = this.DataObject;
                bool flag2       = dataObject4.LiveIdBasicAuthentication ?? false;
                if (flag && flag2)
                {
                    TaskLogger.Trace("Enabling both Basic and LiveIdBasic Authentication is not allowed.", new object[0]);
                    Exception     exception   = new LocalizedException(Strings.ErrorBasicAndLiveIdBasicNotAllowed);
                    ErrorCategory category    = ErrorCategory.InvalidOperation;
                    T             dataObject5 = this.DataObject;
                    base.WriteError(exception, category, dataObject5.Identity);
                }
            }
        }