// Token: 0x06000369 RID: 873 RVA: 0x0000D608 File Offset: 0x0000B808 private void InvokeBposShellService(AuthZClientInfo effectiveCaller) { string text = string.Empty; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(certificateThumbprint); EndpointAddress address = shellServiceClient.Endpoint.Address; Uri uri = new Uri(address.Uri.AbsoluteUri); shellServiceClient.Endpoint.Address = new EndpointAddress(uri, address.Identity, new AddressHeader[0]); string text2 = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; this.userPuid = (string.IsNullOrEmpty(text2) ? HttpContext.Current.Request.Headers["RPSPUID"] : text2); this.boxServiceUrl = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; text = Guid.NewGuid().ToString(); OwaApplication.GetRequestDetailsLogger.ActivityScope.SetProperty(BposAssetReader <T> .LogMetadata.ShellRequestInfo, string.Format("OP:{0},UP:{1},UPN:{2},G:{3}", new object[] { text2, this.userPuid, this.userPrincipalName, text })); this.data = this.ExecuteRequest(shellServiceClient, this.culture.Name, this.userPrincipalName, this.userPuid, effectiveCaller, text); this.LogWorkloadLinks(this.data); } } catch (Exception e) { this.data = default(T); this.LogExceptionFromBposShellService(e, text); } }
protected override BposShellInfo ExecuteRequest(ShellServiceClient client, string cultureName, string userPrincipalName, string userPuid, AuthZClientInfo effectiveCaller, string trackingGuid) { ShellBaseFlight value = ShellBaseFlight.V15Parity; if (this.currentHeaderFlight == BposHeaderFlight.E16Gemini1) { value = ShellBaseFlight.V16; } else if (this.currentHeaderFlight == BposHeaderFlight.E16Gemini2) { value = ShellBaseFlight.V16G2; } ShellInfoRequest shellInfoRequest = new ShellInfoRequest { BrandId = null, CultureName = cultureName, CurrentMainLinkID = NavBarMainLinkID.Outlook, UserPrincipalName = userPrincipalName, UserPuid = userPuid, WorkloadId = WorkloadAuthenticationId.Exchange, TrackingGuid = trackingGuid, ShellBaseFlight = new ShellBaseFlight?(value), UserThemeId = (this.isGemini ? this.userContext.Theme.FolderName : null) }; shellInfoRequest.UserThemeId = null; ShellInfo shellInfo = client.GetShellInfo(shellInfoRequest); return(this.CreateBposShellInfo(shellInfo, effectiveCaller)); }
// Token: 0x06001A94 RID: 6804 RVA: 0x000634DC File Offset: 0x000616DC protected override Alert[] InternalExecute() { string text = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; string userPuid = string.IsNullOrEmpty(text) ? HttpContext.Current.Request.Headers["RPSPUID"] : text; string principalName = ((LiveIDIdentity)Thread.CurrentPrincipal.Identity).PrincipalName; string shellServiceUrl = string.Empty; string trackingGuid = Guid.NewGuid().ToString(); Alert[] alerts; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(certificateThumbprint); shellServiceUrl = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; GetAlertRequest getAlertRequest = new GetAlertRequest { WorkloadId = WorkloadAuthenticationId.Exchange, UserPuid = userPuid, UserPrincipalName = principalName, TrackingGuid = trackingGuid, CultureName = Thread.CurrentThread.CurrentUICulture.Name }; alerts = shellServiceClient.GetAlerts(getAlertRequest); } } catch (Exception) { this.LogExceptionFromO365ShellService(principalName, userPuid, shellServiceUrl, trackingGuid); throw; } return(alerts); }
protected void GetNavBarInfoAndHandleException(ShellServiceClient client, NavBarInfoRequest request) { try { this.CallShellService(client, request); } catch (EndpointNotFoundException ex) { this.shellServiceException = ex; } catch (ActionNotSupportedException ex2) { this.shellServiceException = ex2; } catch (FaultException ex3) { this.shellServiceException = ex3; } catch (MessageSecurityException ex4) { this.shellServiceException = ex4; } finally { client.Close(); } }
protected override BposNavBarInfo ExecuteRequest(ShellServiceClient client, string cultureName, string userPrincipalName, string userPuid, AuthZClientInfo effectiveCaller, string trackingGuid) { NavBarInfoRequest navBarInfoRequest = new NavBarInfoRequest { BrandId = null, CultureName = cultureName, CurrentMainLinkID = NavBarMainLinkID.Outlook, UserPrincipalName = userPrincipalName, UserPuid = userPuid, WorkloadId = WorkloadAuthenticationId.Exchange, TrackingGuid = trackingGuid }; NavBarInfo navBarInfo = client.GetNavBarInfo(navBarInfoRequest); return(this.CreateBposNavBarInfo(navBarInfo, effectiveCaller)); }
public void PrepareNavBarPack() { if (this.userPuid != null && !this.fallbackMode) { if (this.forceReload || !this.UseNavBarPackCache) { ShellServiceClient shellServiceClient = new ShellServiceClient(NavBarClientBase.endPointConfiguration); shellServiceClient.ClientCredentials.ClientCertificate.Certificate = NavBarClientBase.certificate; NavBarInfoRequest navBarInfoRequest = this.CreateRequest(); ExTraceGlobals.WebServiceTracer.TraceInformation(0, 0L, string.Format("NavBarInfoRequest created. TrackingGuid: {0}, WorkloadID: {1}", navBarInfoRequest.TrackingGuid, navBarInfoRequest.WorkloadId.ToString())); this.BeginGetNavBarPack(shellServiceClient, navBarInfoRequest); return; } this.navBarPack = this.TryGetNavBarPackFromCache(); } }
protected override void BeginGetNavBarPack(ShellServiceClient client, NavBarInfoRequest request) { string value = HttpContext.Current.Request.QueryString["flight"]; if (!string.IsNullOrEmpty(value)) { EndpointAddress address = client.Endpoint.Address; Uri uri = new Uri(EcpUrl.AppendQueryParameter(address.Uri.AbsoluteUri, "flight", value)); client.Endpoint.Address = new EndpointAddress(uri, address.Identity, new AddressHeader[0]); } this.stopwatch = new Stopwatch(); this.stopwatch.Start(); this.shellServiceTask = new Task(delegate() { this.GetNavBarInfoAndHandleException(client, request); }); this.shellServiceTask.Start(); }
private void GetSuiteServiceInfo() { if (this.suiteServiceProxyInfo == null) { string text = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; string userPuid = string.IsNullOrEmpty(text) ? HttpContext.Current.Request.Headers["RPSPUID"] : text; string principalName = ((LiveIDIdentity)Thread.CurrentPrincipal.Identity).PrincipalName; string shellServiceUrl = string.Empty; string trackingGuid = string.Empty; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string certificateThumbprint = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(certificateThumbprint); shellServiceUrl = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; trackingGuid = Guid.NewGuid().ToString(); GetSuiteServiceInfoRequest getSuiteServiceInfoRequest = new GetSuiteServiceInfoRequest { WorkloadId = WorkloadAuthenticationId.Exchange, CultureName = CultureInfo.CurrentUICulture.Name, UserPuid = userPuid, UserPrincipalName = principalName, TrackingGuid = trackingGuid, UrlOfRequestingPage = HttpContext.Current.Request.QueryString["returnUrl"] }; this.suiteServiceProxyInfo = shellServiceClient.GetSuiteServiceInfo(getSuiteServiceInfoRequest); } } catch (Exception exception) { this.suiteServiceProxyInfo = null; this.LogExceptionFromO365ShellService(exception, principalName, userPuid, shellServiceUrl); } } }
// Token: 0x0600036A RID: 874 protected abstract T ExecuteRequest(ShellServiceClient client, string cultureName, string userPrincipalName, string userPuid, AuthZClientInfo effectiveCaller, string trackingGuid);
protected override void CallShellService(ShellServiceClient client, NavBarInfoRequest request) { this.shellInfo = client.GetShellInfo((ShellInfoRequest)request); this.stopwatch.Stop(); ExTraceGlobals.WebServiceTracer.TraceInformation(0, 0L, string.Format("Successfully called shell service in {0}ms", this.stopwatch.ElapsedMilliseconds)); }
// Token: 0x06001BCF RID: 7119 RVA: 0x0006B438 File Offset: 0x00069638 private bool UpdateO365Theme(string themeId, string userPrincipalName, UserContext userContext) { bool flag = userContext.FeaturesManager.ClientServerSettings.O365Header.Enabled || userContext.FeaturesManager.ClientServerSettings.O365G2Header.Enabled; this.tracer.TraceDebug <bool, bool>(0L, "UpdateO365Theme::isFeatureSupported='{0}', this.skipO365Call='{1}'", flag, this.request.SkipO365Call); if (!flag || this.request.SkipO365Call) { return(false); } string text = null; string text2 = null; string text3 = string.Empty; bool result; try { using (ShellServiceClient shellServiceClient = new ShellServiceClient("MsOnlineShellService_EndPointConfiguration")) { string text4 = ConfigurationManager.AppSettings["MsOnlineShellService_CertThumbprint"]; this.tracer.TraceDebug <string, CommunicationState>(1L, "UpdateO365Theme::certificateThumbprint='{0}',client.State'={1}'", text4, shellServiceClient.State); shellServiceClient.ClientCredentials.ClientCertificate.Certificate = TlsCertificateInfo.FindCertByThumbprint(text4); EndpointAddress address = shellServiceClient.Endpoint.Address; Uri uri = new Uri(address.Uri.AbsoluteUri); shellServiceClient.Endpoint.Address = new EndpointAddress(uri, address.Identity, new AddressHeader[0]); string text5 = HttpContext.Current.Request.Headers["RPSOrgIdPUID"]; text = (string.IsNullOrEmpty(text5) ? HttpContext.Current.Request.Headers["RPSPUID"] : text5); text2 = shellServiceClient.Endpoint.Address.Uri.AbsoluteUri; text3 = Guid.NewGuid().ToString(); this.tracer.TraceDebug(2L, "UpdateO365Theme::orgIdPuid='{0}', userPuid='{1}', userPrincipalName='{2}',serviceUrl='{3}'", new object[] { text5, text, userPrincipalName, text2 }); SetUserThemeRequest setUserThemeRequest = new SetUserThemeRequest { ThemeId = themeId, TrackingGuid = text3, UserPrincipalName = userPrincipalName, UserPuid = text, WorkloadId = WorkloadAuthenticationId.Exchange }; this.tracer.TraceDebug(3L, "UpdateO365Theme::setUserThemeRequest.ThemeId='{0}', .TrackingGuid='{1}', .UserPrincipalName='{2}', .UserPuid='{3}', .WorkloadId='{4}'", new object[] { setUserThemeRequest.ThemeId, setUserThemeRequest.TrackingGuid, setUserThemeRequest.UserPrincipalName, setUserThemeRequest.UserPuid, setUserThemeRequest.WorkloadId }); shellServiceClient.SetUserTheme(setUserThemeRequest); this.tracer.TraceDebug <CommunicationState>(4L, "UpdateO365Theme::setUserThemeRequest.State='{0}'", shellServiceClient.State); result = true; } } catch (Exception ex) { this.tracer.TraceError(5L, "UpdateO365Theme::Exception: themeId='{0}', trackingGuid='{1}', userPrincipalName='{2}', userPuid='{3}', serviceUrl='{4}', exception='{5}'", new object[] { themeId, text3, userPrincipalName, text, text2, ex }); OwaDiagnostics.LogEvent(ClientsEventLogConstants.Tuple_O365SetUserThemeError, userPrincipalName + text2 + themeId, new object[] { text, userPrincipalName, text3, text2, themeId, ex }); result = false; } return(result); }
protected override void CallShellService(ShellServiceClient client, NavBarInfoRequest request) { this.navbarInfo = client.GetNavBarInfo(request); }
protected abstract void CallShellService(ShellServiceClient client, NavBarInfoRequest request);
protected virtual void BeginGetNavBarPack(ShellServiceClient client, NavBarInfoRequest request) { this.GetNavBarInfoAndHandleException(client, request); }