Beispiel #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"]);
        }
Beispiel #2
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            if (this.DataObject.IsModified(ADOabVirtualDirectorySchema.OAuthAuthentication))
            {
                ExchangeServiceVDirHelper.SetOAuthAuthenticationModule(this.OAuthAuthentication, false, this.DataObject);
            }
            bool flag = this.DataObject.IsModified(ADOabVirtualDirectorySchema.RequireSSL) | this.DataObject.IsModified(ADOabVirtualDirectorySchema.BasicAuthentication) | this.DataObject.IsModified(ADOabVirtualDirectorySchema.WindowsAuthentication);

            base.InternalProcessRecord();
            if (flag)
            {
                try
                {
                    SetOabVirtualDirectory.UpdateMetabase(this.DataObject, new Task.TaskErrorLoggingDelegate(base.WriteError));
                }
                finally
                {
                    if (base.HasErrors)
                    {
                        base.WriteError(new LocalizedException(Strings.ErrorADOperationSucceededButMetabaseOperationFailed), ErrorCategory.WriteError, this.DataObject.Identity);
                    }
                }
            }
            TaskLogger.LogExit();
        }
Beispiel #3
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));
        }
Beispiel #4
0
        protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            bool flag = false;
            ADEcpVirtualDirectory adecpVirtualDirectory = WebAppVirtualDirectoryHelper.FindWebAppVirtualDirectoryInSameWebSite <ADEcpVirtualDirectory>(this.DataObject, base.DataSession);

            if (adecpVirtualDirectory != null)
            {
                if (this.DataObject.IsChanged(ExchangeWebAppVirtualDirectorySchema.DefaultDomain))
                {
                    adecpVirtualDirectory.DefaultDomain = this.DataObject.DefaultDomain;
                    flag = true;
                }
                WebAppVirtualDirectoryHelper.CheckTwoWebAppVirtualDirectories(this.DataObject, adecpVirtualDirectory, new Action <string>(base.WriteWarning), Strings.OwaAuthenticationNotMatchEcpWarning, Strings.OwaUrlNotMatchEcpWarning);
            }
            else
            {
                this.WriteWarning(Strings.CreateEcpForOwaWarning);
            }
            if (this.DataObject.IsChanged(ADOwaVirtualDirectorySchema.AnonymousFeaturesEnabled))
            {
                this.UpdateCalendarMetabase(this.DataObject);
            }
            if (this.DataObject.IsChanged(ADOwaVirtualDirectorySchema.IntegratedFeaturesEnabled))
            {
                this.UpdateIntegratedMetabase(this.DataObject);
            }
            if (this.DataObject.IsChanged(ExchangeWebAppVirtualDirectorySchema.LiveIdAuthentication))
            {
                this.UpdateOmaMetabase(this.DataObject);
            }
            base.InternalProcessRecord();
            ADOwaVirtualDirectory dataObject = this.DataObject;
            bool flag2 = ExchangeServiceVDirHelper.IsBackEndVirtualDirectory(this.DataObject);

            if (dataObject.LiveIdAuthentication)
            {
                WebAppVirtualDirectoryHelper.UpdateMetabase(dataObject, dataObject.MetabasePath, true);
            }
            else
            {
                WebAppVirtualDirectoryHelper.UpdateMetabase(dataObject, dataObject.MetabasePath, flag2);
            }
            if (flag)
            {
                WebAppVirtualDirectoryHelper.UpdateMetabase(adecpVirtualDirectory, adecpVirtualDirectory.MetabasePath, true);
            }
            if (flag2)
            {
                ExchangeServiceVDirHelper.EwsAutodiscMWA.OnSetManageWCFEndpoints(this, ExchangeServiceVDirHelper.EwsAutodiscMWA.EndpointProtocol.OwaEws, false, this.DataObject);
            }
            else if (base.Fields.Contains("FormsAuthentication"))
            {
                ExchangeServiceVDirHelper.UpdateFrontEndHttpModule(this.DataObject, this.FormsAuthentication);
            }
            if (base.Fields.Contains("OAuthAuthentication"))
            {
                ExchangeServiceVDirHelper.SetOAuthAuthenticationModule(this.DataObject.OAuthAuthentication, false, this.DataObject);
            }
            if (base.Fields.Contains("AdfsAuthentication"))
            {
                ExchangeServiceVDirHelper.SetAdfsAuthenticationModule(this.DataObject.AdfsAuthentication, false, this.DataObject);
            }
            TaskLogger.LogExit();
        }