protected override void InternalProcessRecord()
        {
            TaskLogger.LogEnter();
            ADOwaVirtualDirectory adowaVirtualDirectory = WebAppVirtualDirectoryHelper.FindWebAppVirtualDirectoryInSameWebSite <ADOwaVirtualDirectory>(this.DataObject, base.DataSession);

            if (adowaVirtualDirectory != null)
            {
                WebAppVirtualDirectoryHelper.CheckTwoWebAppVirtualDirectories(this.DataObject, adowaVirtualDirectory, new Action <string>(base.WriteWarning), Strings.EcpAuthenticationNotMatchOwaWarning, Strings.EcpUrlNotMatchOwaWarning);
            }
            else
            {
                this.WriteWarning(Strings.CreateOwaForEcpWarning);
            }
            if (this.DataObject.IsChanged(ADEcpVirtualDirectorySchema.AdminEnabled) || this.DataObject.IsChanged(ADEcpVirtualDirectorySchema.OwaOptionsEnabled))
            {
                this.WriteWarning(Strings.NeedIisRestartForChangingECPFeatureWarning);
            }
            base.InternalProcessRecord();
            ADEcpVirtualDirectory dataObject = this.DataObject;

            WebAppVirtualDirectoryHelper.UpdateMetabase(dataObject, dataObject.MetabasePath, true);
            if (!ExchangeServiceVDirHelper.IsBackEndVirtualDirectory(this.DataObject) && base.Fields.Contains("FormsAuthentication"))
            {
                ExchangeServiceVDirHelper.UpdateFrontEndHttpModule(this.DataObject, this.FormsAuthentication);
            }
            if (base.Fields.Contains("AdfsAuthentication"))
            {
                ExchangeServiceVDirHelper.SetAdfsAuthenticationModule(this.DataObject.AdfsAuthentication, false, this.DataObject);
            }
            TaskLogger.LogExit();
        }
Ejemplo n.º 2
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();
        }