Ejemplo n.º 1
0
 private RpcHttpService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.RpcHttp, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
     this.IISAuthenticationMethods           = Service.ConvertToReadOnlyCollection <AuthenticationMethod>(virtualDirectory.IISAuthenticationMethods);
     this.ExternalClientAuthenticationMethod = virtualDirectory.ExternalClientAuthenticationMethod;
     this.InternalClientAuthenticationMethod = virtualDirectory.InternalClientAuthenticationMethod;
     this.XropUrl = virtualDirectory.XropUrl;
 }
Ejemplo n.º 2
0
 internal Service(TopologyServerInfo serverInfo, ServiceType serviceType, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod)
 {
     this.ServerInfo           = serverInfo;
     this.ServiceType          = serviceType;
     this.ClientAccessType     = clientAccessType;
     this.AuthenticationMethod = authenticationMethod;
 }
Ejemplo n.º 3
0
 private EcpService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.ExchangeControlPanel, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
     this.LiveIdAuthentication = virtualDirectory.LiveIdAuthentication;
     this.MetabasePath         = virtualDirectory.MetabasePath;
     this.AdminEnabled         = virtualDirectory.AdminEnabled;
     this.OwaOptionsEnabled    = virtualDirectory.OwaOptionsEnabled;
 }
Ejemplo n.º 4
0
 private MobileSyncService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.MobileSync, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
     this.VirtualDirectoryIdentity = virtualDirectory.ToString();
     this.IsCertEnrollEnabled      = virtualDirectory.MobileClientCertificateProvisioningEnabled;
     this.CertificateAuthorityUrl  = virtualDirectory.MobileClientCertificateAuthorityURL;
     this.CertEnrollTemplateName   = virtualDirectory.MobileClientCertTemplateName;
 }
Ejemplo n.º 5
0
 internal static bool TryCreatePop3Service(MiniEmailTransport emailTransport, TopologyServerInfo serverInfo, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     if (emailTransport.IsPop3)
     {
         service = new Pop3Service(serverInfo, clientAccessType, authenticationMethod, emailTransport);
         return(true);
     }
     service = null;
     return(false);
 }
Ejemplo n.º 6
0
 internal EmailTransportService(TopologyServerInfo serverInfo, ServiceType serviceType, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniEmailTransport emailTransport) : base(serverInfo, serviceType, clientAccessType, authenticationMethod)
 {
     this.PopImapTransport = (emailTransport.IsPop3 || emailTransport.IsImap4);
     if (this.PopImapTransport)
     {
         this.UnencryptedOrTLSPort = EmailTransportService.GetPort(emailTransport.UnencryptedOrTLSBindings);
         this.SSLPort = EmailTransportService.GetPort(emailTransport.SSLBindings);
         this.InternalConnectionSettings = Service.ConvertToReadOnlyCollection <ProtocolConnectionSettings>(emailTransport.InternalConnectionSettings);
         this.ExternalConnectionSettings = Service.ConvertToReadOnlyCollection <ProtocolConnectionSettings>(emailTransport.ExternalConnectionSettings);
         this.LoginType = emailTransport.LoginType;
     }
 }
Ejemplo n.º 7
0
        internal static TopologyServerInfo Get(TopologyServer server, ServiceTopology.All all)
        {
            TopologyServerInfo topologyServerInfo;

            if (!all.Servers.TryGetValue(server.DistinguishedName, out topologyServerInfo))
            {
                Site site = Site.Get(server.TopologySite, all);
                topologyServerInfo = new TopologyServerInfo(site, server);
                all.Servers.Add(topologyServerInfo.DistinguishedName, topologyServerInfo);
            }
            return(topologyServerInfo);
        }
Ejemplo n.º 8
0
        private SmtpService(TopologyServerInfo serverInfo, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniReceiveConnector smtpReceiveConnector, Hostname hostname) : base(serverInfo, ServiceType.Smtp, clientAccessType, authenticationMethod)
        {
            bool           flag           = (smtpReceiveConnector.AuthMechanism & (AuthMechanisms.Tls | AuthMechanisms.BasicAuthRequireTLS)) != AuthMechanisms.None;
            EncryptionType?encryptionType = null;

            if (flag)
            {
                encryptionType = new EncryptionType?(EncryptionType.TLS);
            }
            List <ProtocolConnectionSettings> list = new List <ProtocolConnectionSettings>(smtpReceiveConnector.Bindings.Count);
            HashSet <int> hashSet = new HashSet <int>();

            foreach (IPBinding ipbinding in smtpReceiveConnector.Bindings)
            {
                if (!hashSet.Contains(ipbinding.Port))
                {
                    list.Add(new ProtocolConnectionSettings(hostname, ipbinding.Port, encryptionType));
                    hashSet.Add(ipbinding.Port);
                }
            }
            this.ProtocolConnectionSettings = new ReadOnlyCollection <ProtocolConnectionSettings>(list);
        }
Ejemplo n.º 9
0
 internal static Service CreateHttpService(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod)
 {
     foreach (ServiceTypeInfo serviceTypeInfo in ServiceTypeInfo.serviceTypeInfos)
     {
         ServiceTypeInfo.TryCreateHttpServiceDelegate tryCreateHttpServiceDelegate = serviceTypeInfo.tryCreateServiceDelegate as ServiceTypeInfo.TryCreateHttpServiceDelegate;
         Service result;
         if (tryCreateHttpServiceDelegate != null && tryCreateHttpServiceDelegate(virtualDirectory, serverInfo, url, clientAccessType, authenticationMethod, out result))
         {
             return(result);
         }
     }
     throw new InvalidOperationException(ServerStrings.ExInvalidServiceType);
 }
Ejemplo n.º 10
0
 internal static bool TryCreateService(TopologyServerInfo serverInfo, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     service = new Service(serverInfo, ServiceType.Invalid, clientAccessType, authenticationMethod);
     return(true);
 }
Ejemplo n.º 11
0
 internal static bool TryCreateEmailTransportService(MiniEmailTransport emailTransport, TopologyServerInfo serverInfo, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     service = new EmailTransportService(serverInfo, ServiceType.Invalid, clientAccessType, authenticationMethod, emailTransport);
     return(true);
 }
Ejemplo n.º 12
0
 private E12UnifiedMessagingService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.UnifiedMessaging, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
 }
Ejemplo n.º 13
0
 internal static bool IsFrontEndRole(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo)
 {
     return((serverInfo.Role & ServerRole.Cafe) == ServerRole.Cafe && !virtualDirectory.Name.Contains("(Exchange Back End)"));
 }
Ejemplo n.º 14
0
 public static bool TryCreateMapiHttpService(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     EnumValidator.ThrowIfInvalid <ClientAccessType>(clientAccessType, "clientAccessType");
     if (virtualDirectory.IsMapi)
     {
         service = new MapiHttpService(serverInfo, url, clientAccessType, virtualDirectory);
         return(true);
     }
     service = null;
     return(false);
 }
Ejemplo n.º 15
0
 private Imap4Service(TopologyServerInfo serverInfo, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniEmailTransport emailTransport) : base(serverInfo, ServiceType.Imap4, clientAccessType, authenticationMethod, emailTransport)
 {
 }
Ejemplo n.º 16
0
        internal static bool TryCreateSmtpService(MiniReceiveConnector smtpReceiveConnector, TopologyServerInfo serverInfo, ClientAccessType clientAccessType, out Service service)
        {
            Hostname hostname = null;

            service = null;
            if (!smtpReceiveConnector.AdvertiseClientSettings)
            {
                ExTraceGlobals.SmtpServiceTracer.TraceDebug <string>(0L, "SMTP Receive Connector: {0}, does not have AdvertiseClientSettings set.", smtpReceiveConnector.Name);
                return(false);
            }
            if (smtpReceiveConnector.ServiceDiscoveryFqdn == null && smtpReceiveConnector.Fqdn == null)
            {
                ExTraceGlobals.SmtpServiceTracer.TraceDebug <string>(0L, "SMTP Receive Connector: {0}, has null Fqdn and ServiceDiscoveryFqdn.", smtpReceiveConnector.Name);
                return(false);
            }
            if (smtpReceiveConnector.ServiceDiscoveryFqdn != null)
            {
                if (!Hostname.TryParse(smtpReceiveConnector.ServiceDiscoveryFqdn.ToString(), out hostname))
                {
                    ExTraceGlobals.SmtpServiceTracer.TraceDebug <string>(0L, "SMTP Receive Connector: {0}, has unparsable ServiceDiscoveryFqdn.", smtpReceiveConnector.Name);
                    return(false);
                }
            }
            else if (smtpReceiveConnector.Fqdn != null && !Hostname.TryParse(smtpReceiveConnector.Fqdn.ToString(), out hostname))
            {
                ExTraceGlobals.SmtpServiceTracer.TraceDebug <string>(0L, "SMTP Receive Connector: {0}, has unparsable FQDN.", smtpReceiveConnector.Name);
                return(false);
            }
            AuthenticationMethod authenticationMethod = AuthenticationMethod.None;

            authenticationMethod |= (((smtpReceiveConnector.AuthMechanism & (AuthMechanisms.BasicAuth | AuthMechanisms.BasicAuthRequireTLS)) != AuthMechanisms.None) ? AuthenticationMethod.Basic : AuthenticationMethod.None);
            authenticationMethod |= (((smtpReceiveConnector.AuthMechanism & AuthMechanisms.Integrated) != AuthMechanisms.None) ? AuthenticationMethod.WindowsIntegrated : AuthenticationMethod.None);
            service = new SmtpService(serverInfo, clientAccessType, authenticationMethod, smtpReceiveConnector, hostname);
            return(true);
        }
Ejemplo n.º 17
0
        private void AddSmtpServiceToDictionaries(string localServerFqdn, Dictionary <ServiceType, List <Service> > serviceLists, TopologyServerInfo serverInfo, MiniReceiveConnector smtpReceiveConnector, ClientAccessType clientAccessType)
        {
            Service service = ServiceTypeInfo.CreateSmtpService(smtpReceiveConnector, serverInfo, clientAccessType);

            if (service != null)
            {
                ServiceTopology.AddServiceToServiceListDictionary(serviceLists, service);
                ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug <Service, string, Site>((long)this.GetHashCode(), "ServiceTopology::AddServiceToDictionaries. Found Service. Service = {0}. ServerFqdn = {1}. Site = {2}.", service, serverInfo.ServerFullyQualifiedDomainName, serverInfo.Site);
            }
        }
Ejemplo n.º 18
0
        private void AddEmailTransportServiceToDictionaries(string localServerFqdn, Dictionary <ServiceType, List <Service> > serviceLists, TopologyServerInfo serverInfo, MiniEmailTransport emailTransport, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod)
        {
            Service service = ServiceTypeInfo.CreateEmailTransportService(emailTransport, serverInfo, clientAccessType, authenticationMethod);

            ServiceTopology.AddServiceToServiceListDictionary(serviceLists, service);
            ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug <Service, string, Site>((long)this.GetHashCode(), "ServiceTopology::AddServiceToDictionaries. Found Service. Service = {0}. ServerFqdn = {1}. Site = {2}.", service, serverInfo.ServerFullyQualifiedDomainName, serverInfo.Site);
        }
Ejemplo n.º 19
0
        internal ServiceTopology(ExchangeTopology topology, [CallerFilePath] string callerFilePath = null, [CallerMemberName] string memberName = null, [CallerLineNumber] int callerFileLine = 0)
        {
            ServiceTopologyLog.Instance.Append(callerFilePath, memberName, callerFileLine);
            ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug((long)this.GetHashCode(), "ServiceTopology::Constructor. Creating a ServiceTopology object...");
            if (topology.LocalServer == null)
            {
                ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug((long)this.GetHashCode(), "ServiceTopology::ServiceTopology.ctor. Cannot find the local server from ExchangeTopology. topology.LocalServer == null.");
                throw new ServerNotFoundException(ServerStrings.ExServerNotFound("localhost"), "localhost");
            }
            string fqdn = topology.LocalServer.Fqdn;

            this.discoveryStarted = topology.DiscoveryStarted;
            Dictionary <string, TopologyServerInfo> dictionary = new Dictionary <string, TopologyServerInfo>(topology.AllTopologyServers.Count, StringComparer.OrdinalIgnoreCase);
            Dictionary <string, Site> dictionary2 = new Dictionary <string, Site>(topology.AllTopologyServers.Count, StringComparer.OrdinalIgnoreCase);
            List <string>             list        = new List <string>();
            Dictionary <Site, List <TopologyServerInfo> > dictionary3 = new Dictionary <Site, List <TopologyServerInfo> >(topology.AllTopologySites.Count);

            ServiceTopology.All all = new ServiceTopology.All(topology);
            foreach (TopologyServer topologyServer in topology.AllTopologyServers)
            {
                if (topologyServer.TopologySite != null)
                {
                    if (!dictionary2.ContainsKey(topologyServer.Fqdn))
                    {
                        TopologyServerInfo topologyServerInfo = TopologyServerInfo.Get(topologyServer, all);
                        Site site = topologyServerInfo.Site;
                        dictionary.Add(topologyServer.Fqdn, topologyServerInfo);
                        dictionary2.Add(topologyServer.Fqdn, site);
                        List <TopologyServerInfo> list2;
                        if (!dictionary3.TryGetValue(site, out list2))
                        {
                            list2 = new List <TopologyServerInfo>();
                            dictionary3.Add(site, list2);
                        }
                        list2.Add(topologyServerInfo);
                        ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug <string, string, Site>((long)this.GetHashCode(), "ServiceTopology::Constructor. Found Server in topology. ServerDn = {0}. Server Fqdn = {1}. Site = {2}.", topologyServer.DistinguishedName, topologyServer.Fqdn, site);
                    }
                    else
                    {
                        string arg = string.Empty;
                        foreach (KeyValuePair <string, TopologyServerInfo> keyValuePair in all.Servers)
                        {
                            if (keyValuePair.Value.ServerFullyQualifiedDomainName.Equals(topologyServer.Fqdn))
                            {
                                arg = keyValuePair.Key;
                                break;
                            }
                        }
                        ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug <string, string, string>((long)this.GetHashCode(), "ServiceTopology::Constructor. There are two servers with the same fqdn in the topology. The second server was ignored. Fqdn = {0}. Server1Dn = {1}. Server2Dn = {2}.", topologyServer.Fqdn, arg, topologyServer.DistinguishedName);
                    }
                }
                else
                {
                    ExTraceGlobals.ServiceDiscoveryTracer.TraceDebug <string>((long)this.GetHashCode(), "ServiceTopology::Constructor. Found a Server in the topology without a defined Site. Server = {0}.", topologyServer.DistinguishedName);
                    if (fqdn.Equals(topologyServer.Fqdn))
                    {
                        throw new ServerNotInSiteException(ServerStrings.ExCurrentServerNotInSite(fqdn), fqdn);
                    }
                    if (!list.Contains(topologyServer.Fqdn))
                    {
                        list.Add(topologyServer.Fqdn);
                    }
                }
            }
            Dictionary <ServiceType, List <Service> > serviceLists          = new Dictionary <ServiceType, List <Service> >();
            Dictionary <ServiceType, List <Service> > serviceLists2         = new Dictionary <ServiceType, List <Service> >();
            ReadOnlyCollection <MiniVirtualDirectory> allVirtualDirectories = topology.AllVirtualDirectories;

            if (allVirtualDirectories != null)
            {
                foreach (MiniVirtualDirectory miniVirtualDirectory in allVirtualDirectories)
                {
                    TopologyServerInfo serverInfo;
                    if (all.Servers.TryGetValue(miniVirtualDirectory.Server.DistinguishedName, out serverInfo))
                    {
                        if (HttpService.IsFrontEndRole(miniVirtualDirectory, serverInfo))
                        {
                            this.AddHttpServiceToDictionaries(fqdn, serviceLists2, serverInfo, miniVirtualDirectory, ClientAccessType.Unknown, null, AuthenticationMethod.None);
                        }
                        if (miniVirtualDirectory.InternalUrl != null)
                        {
                            AuthenticationMethod authenticationMethod = ServiceTopology.GetAuthenticationMethod(miniVirtualDirectory[MiniVirtualDirectorySchema.InternalAuthenticationMethodFlags]);
                            this.AddHttpServiceToDictionaries(fqdn, serviceLists, serverInfo, miniVirtualDirectory, ClientAccessType.Internal, miniVirtualDirectory.InternalUrl, authenticationMethod);
                        }
                        if (miniVirtualDirectory.IsWebServices && miniVirtualDirectory.InternalNLBBypassUrl != null)
                        {
                            AuthenticationMethod authenticationMethod2 = ServiceTopology.GetAuthenticationMethod(miniVirtualDirectory[MiniVirtualDirectorySchema.InternalAuthenticationMethodFlags]);
                            this.AddHttpServiceToDictionaries(fqdn, serviceLists, serverInfo, miniVirtualDirectory, ClientAccessType.InternalNLBBypass, miniVirtualDirectory.InternalNLBBypassUrl, authenticationMethod2);
                        }
                        if (miniVirtualDirectory.ExternalUrl != null)
                        {
                            AuthenticationMethod authenticationMethod3 = ServiceTopology.GetAuthenticationMethod(miniVirtualDirectory[MiniVirtualDirectorySchema.ExternalAuthenticationMethodFlags]);
                            this.AddHttpServiceToDictionaries(fqdn, serviceLists, serverInfo, miniVirtualDirectory, ClientAccessType.External, miniVirtualDirectory.ExternalUrl, authenticationMethod3);
                        }
                    }
                }
            }
            ReadOnlyCollection <MiniEmailTransport> allEmailTransports = topology.AllEmailTransports;

            if (allEmailTransports != null)
            {
                foreach (MiniEmailTransport miniEmailTransport in allEmailTransports)
                {
                    if (miniEmailTransport.IsPop3 || miniEmailTransport.IsImap4)
                    {
                        MiniEmailTransport miniEmailTransport2 = miniEmailTransport;
                        TopologyServerInfo topologyServerInfo2;
                        if (all.Servers.TryGetValue(miniEmailTransport2.Server.DistinguishedName, out topologyServerInfo2))
                        {
                            bool          flag          = miniEmailTransport2.ExchangeVersion.IsOlderThan(ExchangeObjectVersion.Exchange2010);
                            ServerVersion serverVersion = new ServerVersion(topologyServerInfo2.VersionNumber);
                            flag |= (VariantConfiguration.InvariantNoFlightingSnapshot.DataStorage.CheckR3Coexistence.Enabled && serverVersion.Major == Server.Exchange2009MajorVersion && serverVersion.Build == 482);
                            if ((miniEmailTransport2.InternalConnectionSettings != null && miniEmailTransport2.InternalConnectionSettings.Count > 0) || flag)
                            {
                                this.AddEmailTransportServiceToDictionaries(fqdn, serviceLists, topologyServerInfo2, miniEmailTransport2, ClientAccessType.Internal, AuthenticationMethod.None);
                            }
                            if ((miniEmailTransport2.ExternalConnectionSettings != null && miniEmailTransport2.ExternalConnectionSettings.Count > 0) || flag)
                            {
                                this.AddEmailTransportServiceToDictionaries(fqdn, serviceLists, topologyServerInfo2, miniEmailTransport2, ClientAccessType.External, AuthenticationMethod.None);
                            }
                        }
                    }
                }
            }
            ReadOnlyCollection <MiniReceiveConnector> allSmtpReceiveConnectors = topology.AllSmtpReceiveConnectors;

            if (allSmtpReceiveConnectors != null)
            {
                foreach (MiniReceiveConnector miniReceiveConnector in allSmtpReceiveConnectors)
                {
                    TopologyServerInfo serverInfo2;
                    if (all.Servers.TryGetValue(miniReceiveConnector.Server.DistinguishedName, out serverInfo2))
                    {
                        this.AddSmtpServiceToDictionaries(fqdn, serviceLists, serverInfo2, miniReceiveConnector, ClientAccessType.External);
                        this.AddSmtpServiceToDictionaries(fqdn, serviceLists, serverInfo2, miniReceiveConnector, ClientAccessType.Internal);
                    }
                }
            }
            Dictionary <string, Site> dictionary4 = new Dictionary <string, Site>(topology.AllTopologySites.Count, StringComparer.OrdinalIgnoreCase);

            foreach (TopologySite topologySite in topology.AllTopologySites)
            {
                dictionary4[topologySite.DistinguishedName] = Site.Get(topologySite, all);
            }
            this.localServerInfo        = TopologyServerInfo.Get(topology.LocalServer, all);
            this.serverToSiteDictionary = dictionary2;
            this.services                 = serviceLists;
            this.cafeServices             = serviceLists2;
            this.serversWithoutSite       = list;
            this.siteToServersDictionary  = dictionary3;
            this.siteDictionary           = dictionary4;
            this.serverFqdnDictionary     = dictionary;
            this.connectionCostCalculator = new ConnectionCostCalculator(topology.AllTopologySites.Count);
        }
Ejemplo n.º 20
0
 private WebServicesService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.WebServices, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
     this.ServerDistinguishedName = virtualDirectory.Server.DistinguishedName;
     this.MRSProxyEnabled         = virtualDirectory.MRSProxyEnabled;
 }
Ejemplo n.º 21
0
 internal static Service CreateEmailTransportService(MiniEmailTransport emailTransport, TopologyServerInfo serverInfo, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod)
 {
     foreach (ServiceTypeInfo serviceTypeInfo in ServiceTypeInfo.serviceTypeInfos)
     {
         ServiceTypeInfo.TryCreateEmailTransportServiceDelegate tryCreateEmailTransportServiceDelegate = serviceTypeInfo.tryCreateServiceDelegate as ServiceTypeInfo.TryCreateEmailTransportServiceDelegate;
         Service result;
         if (tryCreateEmailTransportServiceDelegate != null && tryCreateEmailTransportServiceDelegate(emailTransport, serverInfo, clientAccessType, authenticationMethod, out result))
         {
             return(result);
         }
     }
     throw new InvalidOperationException(ServerStrings.ExInvalidServiceType);
 }
Ejemplo n.º 22
0
 public static bool TryCreateRpcHttpService(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     if (virtualDirectory.IsRpcHttp)
     {
         service = new RpcHttpService(serverInfo, url, clientAccessType, authenticationMethod, virtualDirectory);
         return(true);
     }
     service = null;
     return(false);
 }
Ejemplo n.º 23
0
 internal static Service CreateSmtpService(MiniReceiveConnector smtpReceiveConnector, TopologyServerInfo serverInfo, ClientAccessType clientAccessType)
 {
     foreach (ServiceTypeInfo serviceTypeInfo in ServiceTypeInfo.serviceTypeInfos)
     {
         ServiceTypeInfo.TryCreateSmtpServiceDelegate tryCreateSmtpServiceDelegate = serviceTypeInfo.tryCreateServiceDelegate as ServiceTypeInfo.TryCreateSmtpServiceDelegate;
         if (tryCreateSmtpServiceDelegate != null)
         {
             Service service;
             Service result;
             if (tryCreateSmtpServiceDelegate(smtpReceiveConnector, serverInfo, clientAccessType, out service))
             {
                 result = service;
             }
             else
             {
                 result = null;
             }
             return(result);
         }
     }
     throw new InvalidOperationException(ServerStrings.ExInvalidServiceType);
 }
Ejemplo n.º 24
0
 private OwaService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.OutlookWebAccess, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
     this.AnonymousFeaturesEnabled = (virtualDirectory.AnonymousFeaturesEnabled == true);
     this.FailbackUrl = virtualDirectory.FailbackUrl;
     this.IntegratedFeaturesEnabled = (virtualDirectory.IntegratedFeaturesEnabled != null && virtualDirectory.IntegratedFeaturesEnabled != null && virtualDirectory.IntegratedFeaturesEnabled.Value);
 }
Ejemplo n.º 25
0
 private MapiHttpService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.MapiHttp, url, clientAccessType, AuthenticationMethod.None, virtualDirectory)
 {
     this.LastConfigurationTime = (virtualDirectory.WhenChangedUTC ?? (virtualDirectory.WhenCreatedUTC ?? DateTime.MinValue));
 }
 private AvailabilityForeignConnectorService(TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, ServiceType.AvailabilityForeignConnector, url, clientAccessType, authenticationMethod, virtualDirectory)
 {
     this.AvailabilityForeignConnectorType    = virtualDirectory.AvailabilityForeignConnectorType;
     this.AvailabilityForeignConnectorDomains = new ReadOnlyCollection <string>(virtualDirectory.AvailabilityForeignConnectorDomains.ToArray());
 }
Ejemplo n.º 27
0
 internal HttpService(TopologyServerInfo serverInfo, ServiceType serviceType, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, MiniVirtualDirectory virtualDirectory) : base(serverInfo, serviceType, clientAccessType, authenticationMethod)
 {
     this.Url        = url;
     this.IsFrontEnd = HttpService.IsFrontEndRole(virtualDirectory, serverInfo);
     this.ADObjectId = virtualDirectory.Id;
 }
 internal static bool TryCreateAvailabilityForeignConnectorService(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     if (virtualDirectory.IsAvailabilityForeignConnector)
     {
         service = new AvailabilityForeignConnectorService(serverInfo, url, clientAccessType, authenticationMethod, virtualDirectory);
         return(true);
     }
     service = null;
     return(false);
 }
Ejemplo n.º 29
0
 internal static bool TryCreateHttpService(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     service = new HttpService(serverInfo, ServiceType.Invalid, url, clientAccessType, authenticationMethod, virtualDirectory);
     return(true);
 }
Ejemplo n.º 30
0
 internal static bool TryCreateUnifiedMessagingService(MiniVirtualDirectory virtualDirectory, TopologyServerInfo serverInfo, Uri url, ClientAccessType clientAccessType, AuthenticationMethod authenticationMethod, out Service service)
 {
     if (virtualDirectory.IsE12UM)
     {
         service = new E12UnifiedMessagingService(serverInfo, url, clientAccessType, authenticationMethod, virtualDirectory);
         return(true);
     }
     service = null;
     return(false);
 }