コード例 #1
0
        protected override void InternalValidate()
        {
            base.InternalValidate();
            if (base.HasErrors)
            {
                return;
            }
            ADOwaVirtualDirectory dataObject = this.DataObject;

            if (dataObject.ExchangeVersion.IsOlderThan(ADOwaVirtualDirectory.MinimumSupportedExchangeObjectVersion))
            {
                base.WriteError(new TaskException(Strings.ErrorSetOlderVirtualDirectory(dataObject.Identity.ToString(), dataObject.ExchangeVersion.ToString(), ADOwaVirtualDirectory.MinimumSupportedExchangeObjectVersion.ToString())), ErrorCategory.InvalidArgument, null);
            }
            if (dataObject.WebReadyFileTypes != null)
            {
                foreach (string text in dataObject.WebReadyFileTypes)
                {
                    if (!dataObject.WebReadyDocumentViewingSupportedFileTypes.Contains(text.ToLower()))
                    {
                        PropertyValidationError error     = new PropertyValidationError(DataStrings.ConstraintViolationValueIsNotInGivenStringArray(string.Join(",", dataObject.WebReadyDocumentViewingSupportedFileTypes.ToArray()), text), ADOwaVirtualDirectorySchema.WebReadyFileTypes, dataObject.WebReadyFileTypes);
                        DataValidationException exception = new DataValidationException(error);
                        base.WriteError(exception, ErrorCategory.InvalidArgument, this.DataObject.Identity);
                    }
                }
            }
            if (dataObject.WebReadyMimeTypes != null)
            {
                foreach (string text2 in dataObject.WebReadyMimeTypes)
                {
                    if (!dataObject.WebReadyDocumentViewingSupportedMimeTypes.Contains(text2.ToLower()))
                    {
                        PropertyValidationError error2     = new PropertyValidationError(DataStrings.ConstraintViolationValueIsNotInGivenStringArray(string.Join(",", dataObject.WebReadyDocumentViewingSupportedMimeTypes.ToArray()), text2), ADOwaVirtualDirectorySchema.WebReadyMimeTypes, dataObject.WebReadyMimeTypes);
                        DataValidationException exception2 = new DataValidationException(error2);
                        base.WriteError(exception2, ErrorCategory.InvalidArgument, this.DataObject.Identity);
                    }
                }
            }
            if (dataObject.InstantMessagingType == InstantMessagingTypeOptions.Msn && !Datacenter.IsMultiTenancyEnabled())
            {
                base.WriteError(new TaskException(Strings.ErrorMsnIsNotSupportedInEnterprise), ErrorCategory.InvalidArgument, null);
            }
            if (base.Fields.Contains("AdfsAuthentication") && this.DataObject.AdfsAuthentication)
            {
                ADEcpVirtualDirectory adecpVirtualDirectory = WebAppVirtualDirectoryHelper.FindWebAppVirtualDirectoryInSameWebSite <ADEcpVirtualDirectory>(this.DataObject, base.DataSession);
                if (adecpVirtualDirectory == null || !adecpVirtualDirectory.AdfsAuthentication)
                {
                    base.WriteError(new TaskException(Strings.CannotConfigureAdfsOwaWithoutEcpFirst), ErrorCategory.InvalidOperation, null);
                }
            }
        }
コード例 #2
0
        internal static EcpVdirConfiguration CreateInstance(ITopologyConfigurationSession session, ADObjectId virtualDirectoryDN)
        {
            ADEcpVirtualDirectory adecpVirtualDirectory = null;

            ADEcpVirtualDirectory[] array = session.Find <ADEcpVirtualDirectory>(virtualDirectoryDN, QueryScope.Base, null, null, 1);
            if (array != null && array.Length == 1)
            {
                adecpVirtualDirectory = array[0];
            }
            if (adecpVirtualDirectory == null)
            {
                throw new ADNoSuchObjectException(LocalizedString.Empty);
            }
            return(new EcpVdirConfiguration(adecpVirtualDirectory));
        }
コード例 #3
0
        // Token: 0x06000016 RID: 22 RVA: 0x00002D24 File Offset: 0x00000F24
        internal static EcpVdirConfiguration CreateInstance(ITopologyConfigurationSession session, ADObjectId virtualDirectoryDN)
        {
            ADEcpVirtualDirectory adecpVirtualDirectory = null;

            ADEcpVirtualDirectory[] array = session.Find <ADEcpVirtualDirectory>(virtualDirectoryDN, 0, null, null, 1, "d:\\dbs\\sh\\e16df\\0212_214120_0\\cmd\\1g\\sources\\Dev\\Cafe\\src\\HttpProxy\\fba\\EcpVdirConfiguration.cs", 52, "CreateInstance");
            if (array != null && array.Length == 1)
            {
                adecpVirtualDirectory = array[0];
            }
            if (adecpVirtualDirectory == null)
            {
                throw new ADNoSuchObjectException(LocalizedString.Empty);
            }
            return(new EcpVdirConfiguration(adecpVirtualDirectory));
        }
コード例 #4
0
 private EcpVdirConfiguration(ADEcpVirtualDirectory ecpVirtualDirectory) : base(ecpVirtualDirectory)
 {
 }
コード例 #5
0
        // Token: 0x060003B6 RID: 950 RVA: 0x0001573C File Offset: 0x0001393C
        internal static ADObject CreateAndInitializeConfigObject <TConfigObject>(ADPropertyBag propertyBag, ADRawEntry dummyObject, IDirectorySession directorySession) where TConfigObject : IConfigurable, new()
        {
            ArgumentValidator.ThrowIfNull("propertyBag", propertyBag);
            MultiValuedProperty <string> multiValuedProperty = (MultiValuedProperty <string>)propertyBag[ADObjectSchema.ObjectClass];
            ADObject adobject;

            if (dummyObject is MiniTopologyServer)
            {
                adobject = new MiniTopologyServer();
            }
            else if (dummyObject is MiniVirtualDirectory)
            {
                adobject = new MiniVirtualDirectory();
            }
            else if (dummyObject is MiniEmailTransport)
            {
                adobject = new MiniEmailTransport();
            }
            else if (dummyObject is MiniReceiveConnector)
            {
                adobject = new MiniReceiveConnector();
            }
            else if (multiValuedProperty.Contains(ADWebServicesVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADWebServicesVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADE12UMVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADE12UMVirtualDirectory();
            }
            else if (multiValuedProperty.Contains("msExchMobileVirtualDirectory"))
            {
                adobject = new ADMobileVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADOwaVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADOwaVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADRpcHttpVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADRpcHttpVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADMapiVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADMapiVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADAvailabilityForeignConnectorVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADAvailabilityForeignConnectorVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADOabVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADOabVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(ADEcpVirtualDirectory.MostDerivedClass))
            {
                adobject = new ADEcpVirtualDirectory();
            }
            else if (multiValuedProperty.Contains(Pop3AdConfiguration.MostDerivedClass))
            {
                adobject = new Pop3AdConfiguration();
            }
            else if (multiValuedProperty.Contains(Imap4AdConfiguration.MostDerivedClass))
            {
                adobject = new Imap4AdConfiguration();
            }
            else if (multiValuedProperty.Contains("mailGateway"))
            {
                if (multiValuedProperty.Contains(SmtpSendConnectorConfig.MostDerivedClass))
                {
                    adobject = new SmtpSendConnectorConfig();
                }
                else if (multiValuedProperty.Contains(DeliveryAgentConnector.MostDerivedClass))
                {
                    adobject = new DeliveryAgentConnector();
                }
                else if (propertyBag.Contains(ForeignConnectorSchema.DropDirectory))
                {
                    adobject = new ForeignConnector();
                }
                else
                {
                    adobject = new LegacyGatewayConnector();
                }
            }
            else if (multiValuedProperty.Contains("msExchEdgeSyncEhfConnector"))
            {
                adobject = new EdgeSyncEhfConnector();
            }
            else
            {
                if (!multiValuedProperty.Contains("msExchEdgeSyncMservConnector"))
                {
                    return(ADObjectFactory.CreateAndInitializeObject <TConfigObject>(propertyBag, directorySession));
                }
                adobject = new EdgeSyncMservConnector();
            }
            adobject.m_Session   = directorySession;
            adobject.propertyBag = propertyBag;
            adobject.Initialize();
            adobject.ResetChangeTracking(true);
            if (directorySession != null)
            {
                adobject.SetIsReadOnly(directorySession.ReadOnly);
            }
            return(adobject);
        }
コード例 #6
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();
        }