// Token: 0x06000031 RID: 49 RVA: 0x00003470 File Offset: 0x00001670 internal static Uri GetRedirectUrlForTenantForest(string domain, string podRedirectTemplate, Uri originalUrl, int podSiteStartRange, int podSiteEndRange) { int partnerId = LocalSiteCache.LocalSite.PartnerId; Guid orgId; string redirectServer; if (GuidHelper.TryParseGuid(domain, out orgId)) { redirectServer = EdgeSyncMservConnector.GetRedirectServer(podRedirectTemplate, orgId, partnerId, podSiteStartRange, podSiteEndRange); } else { redirectServer = EdgeSyncMservConnector.GetRedirectServer(podRedirectTemplate, string.Format("E5CB63F56E8B4b69A1F70C192276D6AD@{0}", domain), partnerId, podSiteStartRange, podSiteEndRange); } if (string.IsNullOrEmpty(redirectServer)) { return(null); } UriBuilder uriBuilder = new UriBuilder(originalUrl); uriBuilder.Host = redirectServer; if (uriBuilder.Port == 444) { uriBuilder.Port = 443; } return(uriBuilder.Uri); }
// Token: 0x060002B8 RID: 696 RVA: 0x0000D928 File Offset: 0x0000BB28 private string InvokeMserv(string userAddress) { int currentSitePartnerId = HttpProxyGlobals.LocalSite.Member.PartnerId; string text = null; long num = 0L; Exception ex = null; try { text = LatencyTracker.GetLatency <string>(() => EdgeSyncMservConnector.GetRedirectServer(DatacenterRedirectStrategy.PodRedirectTemplate.Value, userAddress, currentSitePartnerId, DatacenterRedirectStrategy.PodSiteStartRange.Value, DatacenterRedirectStrategy.PodSiteEndRange.Value, false, true), out num); } catch (MServTransientException ex) { } catch (MServPermanentException ex) { } catch (InvalidOperationException ex) { } catch (LocalizedException ex) { } finally { this.RequestContext.Logger.AppendGenericInfo("MservLatency", num); } string message = string.Format("Failed to look up MSERV for address {0}.", userAddress); if (ex != null) { if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(3)) { ExTraceGlobals.VerboseTracer.TraceError <int, string, Exception>((long)this.GetHashCode(), "[DatacenterRedirectStrategy::InvokeMserv]: Context {0}. Failed to look up MSERV for address {1}. Error: {2}", this.TraceContext, userAddress, ex); } throw new HttpProxyException(HttpStatusCode.InternalServerError, 2002, message, ex); } if (string.IsNullOrEmpty(text)) { if (ExTraceGlobals.VerboseTracer.IsTraceEnabled(3)) { ExTraceGlobals.VerboseTracer.TraceError <int, string>((long)this.GetHashCode(), "[DatacenterRedirectStrategy::InvokeMserv]: Context {0}. MSERV did not return redirect server for address {1}.", this.TraceContext, userAddress); } throw new HttpProxyException(HttpStatusCode.InternalServerError, 2002, message); } return(text); }