Ejemplo n.º 1
0
        public static Uri GetExternalUrl <Service>(string serverFqdn) where Service : HttpService
        {
            ServiceType key = GlobalServiceUrls.ConvertHttpServiceType <Service>();

            GlobalServiceUrls.DiscoverUrlsIfNeeded();
            VDirInfo   vdirInfo    = GlobalServiceUrls.E15Services[key];
            Uri        externalUri = vdirInfo.ExternalUri;
            UriBuilder uriBuilder  = new UriBuilder(externalUri.Scheme, serverFqdn, 443, vdirInfo.Path);

            return(uriBuilder.Uri);
        }
Ejemplo n.º 2
0
        private static void SelectUrl(ServiceType serviceType, MiniVirtualDirectory vdir, Dictionary <ServiceType, VDirInfo> e15Services, ref bool found)
        {
            if (found)
            {
                return;
            }
            Uri uri = vdir.ExternalUrl;

            if (uri == null && !GlobalServiceUrls.IsDatacenter)
            {
                uri = vdir.InternalUrl;
            }
            if (uri != null)
            {
                found = true;
                VDirInfo value = new VDirInfo(uri);
                e15Services[serviceType] = value;
                ExTraceGlobals.CafeTracer.TraceDebug <Uri>(0L, "[GlobalServiceUrls.SelectUrl] Found URL: {0}", uri);
            }
        }