Esempio n. 1
0
        private static Uri GetFrontEndHttpServiceUrl <ServiceType>(IExchangePrincipal exchangePrincipal) where ServiceType : HttpService
        {
            if (exchangePrincipal == null)
            {
                throw new ArgumentNullException("exchangePrincipal");
            }
            if (exchangePrincipal.MailboxInfo.Location.ServerVersion >= Server.E15MinVersion && FrontEndLocator.IsDatacenter)
            {
                return(GlobalServiceUrls.GetExternalUrl <ServiceType>());
            }
            ServiceTopology     serviceTopology = FrontEndLocator.IsDatacenter ? ServiceTopology.GetCurrentLegacyServiceTopology("f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\FrontEndLocator.cs", "GetFrontEndHttpServiceUrl", 276) : ServiceTopology.GetCurrentServiceTopology("f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\FrontEndLocator.cs", "GetFrontEndHttpServiceUrl", 276);
            ServerVersion       serverVersion   = new ServerVersion(exchangePrincipal.MailboxInfo.Location.ServerVersion);
            int                 majorversion    = serverVersion.Major;
            IList <ServiceType> services        = serviceTopology.FindAll <ServiceType>(exchangePrincipal, ClientAccessType.External, (ServiceType service) => new ServerVersion(service.ServerVersionNumber).Major == majorversion, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\FrontEndLocator.cs", "GetFrontEndHttpServiceUrl", 281);
            Uri                 uri             = FrontEndLocator.FindServiceInList <ServiceType>(services);

            if (uri == null)
            {
                services = serviceTopology.FindAll <ServiceType>(exchangePrincipal, ClientAccessType.Internal, (ServiceType service) => new ServerVersion(service.ServerVersionNumber).Major == majorversion, "f:\\15.00.1497\\sources\\dev\\data\\src\\ApplicationLogic\\Cafe\\FrontEndLocator.cs", "GetFrontEndHttpServiceUrl", 285);
                uri      = FrontEndLocator.FindServiceInList <ServiceType>(services);
            }
            if (uri != null)
            {
                ExTraceGlobals.CafeTracer.TraceDebug <string>(0L, "[FrontEndLocator.GetFrontEndHttpServiceUrl] Found HTTP service for the specified back end server {0}.", exchangePrincipal.MailboxInfo.Location.ServerFqdn);
                return(uri);
            }
            throw new ServerNotFoundException("Unable to find proper HTTP service.");
        }
Esempio n. 2
0
 public static Uri GetFrontEndWebServicesUrl(string serverFqdn)
 {
     return(GlobalServiceUrls.GetExternalUrl <WebServicesService>(serverFqdn));
 }
Esempio n. 3
0
 public static Uri GetDatacenterFrontEndOabUrl()
 {
     return(GlobalServiceUrls.GetExternalUrl <OabService>());
 }
Esempio n. 4
0
 public static Uri GetDatacenterFrontEndEasUrl()
 {
     return(GlobalServiceUrls.GetExternalUrl <MobileSyncService>());
 }
Esempio n. 5
0
 public static Uri GetDatacenterMapiHttpUrl()
 {
     return(GlobalServiceUrls.GetExternalUrl <MapiHttpService>());
 }