Exemplo n.º 1
0
        protected override void InternalProcessRecord()
        {
            T    dataObject  = this.DataObject;
            byte major       = dataObject.ExchangeVersion.ExchangeBuild.Major;
            T    dataObject2 = this.DataObject;

            if (major != dataObject2.MaximumSupportedExchangeObjectVersion.ExchangeBuild.Major)
            {
                T dataObject3 = this.DataObject;
                base.WriteError(new CannotModifyCrossVersionObjectException(dataObject3.Id.DistinguishedName), ErrorCategory.InvalidOperation, null);
                return;
            }
            base.InternalProcessRecord();
            T dataObject4 = this.DataObject;

            base.WriteVerbose(Strings.VerboseApplyingAuthenticationSettingForVDir(dataObject4.MetabasePath));
            ExchangeServiceVDirHelper.SetIisVirtualDirectoryAuthenticationMethods(this.DataObject, new Task.TaskErrorLoggingDelegate(base.WriteError), this.MetabaseSetPropertiesFailureMessage);
            T dataObject5 = this.DataObject;

            if (dataObject5.LiveIdBasicAuthentication != null)
            {
                ExchangeServiceVDirHelper.SetLiveIdBasicAuthModule(this.LiveIdBasicAuthentication, false, this.DataObject);
            }
            T dataObject6 = this.DataObject;

            if (dataObject6.OAuthAuthentication != null)
            {
                T dataObject7 = this.DataObject;
                ExchangeServiceVDirHelper.SetOAuthAuthenticationModule(dataObject7.OAuthAuthentication.Value, false, this.DataObject);
            }
            ExchangeServiceVDirHelper.CheckAndUpdateWindowsAuthProvidersIfNecessary(this.DataObject, (bool?)base.Fields["WindowsAuthentication"]);
        }
 protected override void InternalProcessComplete()
 {
     base.InternalProcessComplete();
     if (this.CertificateAuthentication)
     {
         T dataObject = this.DataObject;
         dataObject.CertificateAuthentication = new bool?(true);
         ADExchangeServiceVirtualDirectory virtualDirectory = this.DataObject;
         Task.TaskErrorLoggingDelegate     errorHandler     = new Task.TaskErrorLoggingDelegate(base.WriteError);
         T dataObject2 = this.DataObject;
         ExchangeServiceVDirHelper.SetIisVirtualDirectoryAuthenticationMethods(virtualDirectory, errorHandler, Strings.ErrorUpdatingVDir(dataObject2.MetabasePath, string.Empty));
     }
 }
 protected override void InternalProcessRecord()
 {
     base.InternalProcessRecord();
     base.InternalEnableLiveIdNegotiateAuxiliaryModule();
     if (base.Fields["CertificateAuthentication"] != null)
     {
         T dataObject = this.DataObject;
         dataObject.CertificateAuthentication = new bool?((bool)base.Fields["CertificateAuthentication"]);
         ADExchangeServiceVirtualDirectory virtualDirectory = this.DataObject;
         Task.TaskErrorLoggingDelegate     errorHandler     = new Task.TaskErrorLoggingDelegate(base.WriteError);
         T dataObject2 = this.DataObject;
         ExchangeServiceVDirHelper.SetIisVirtualDirectoryAuthenticationMethods(virtualDirectory, errorHandler, Strings.ErrorUpdatingVDir(dataObject2.MetabasePath, string.Empty));
         T dataObject3 = this.DataObject;
         ExchangeServiceVDirHelper.ConfigureAnonymousAuthentication(dataObject3.MetabasePath, false);
     }
     if (base.Fields["EnableCertificateHeaderAuthModule"] != null)
     {
         base.SetCertificateHeaderAuthenticationModule(this.EnableCertificateHeaderAuthModule, false);
     }
 }
Exemplo n.º 4
0
        protected override void InternalProcessComplete()
        {
            ADExchangeServiceVirtualDirectory adexchangeServiceVirtualDirectory = this.DataObject;

            base.InternalProcessComplete();
            ExchangeServiceVDirHelper.SetIisVirtualDirectoryAuthenticationMethods(adexchangeServiceVirtualDirectory, new Task.TaskErrorLoggingDelegate(base.WriteError), this.MetabaseSetPropertiesFailureMessage);
            T dataObject = this.DataObject;

            if (dataObject.LiveIdBasicAuthentication != null)
            {
                T dataObject2 = this.DataObject;
                ExchangeServiceVDirHelper.SetLiveIdBasicAuthModule(dataObject2.LiveIdBasicAuthentication.Value, false, adexchangeServiceVirtualDirectory);
            }
            T dataObject3 = this.DataObject;

            if (dataObject3.OAuthAuthentication != null)
            {
                T dataObject4 = this.DataObject;
                ExchangeServiceVDirHelper.SetOAuthAuthenticationModule(dataObject4.OAuthAuthentication.Value, false, adexchangeServiceVirtualDirectory);
            }
            ExchangeServiceVDirHelper.CheckAndUpdateWindowsAuthProvidersIfNecessary(adexchangeServiceVirtualDirectory, new bool?(true));
        }