private void InitializeSSORequest() { string encrypedSSORequest = Request.QueryString["SSORequest"]; string encryptedSSOTicket = Request.QueryString["SSOTicket"]; if (!string.IsNullOrEmpty(encryptedSSOTicket)) { try { SSOTicket ssoTicket = _SSOHelper.DecryptSSOTicket(encryptedSSOTicket); _SSOHelper.SaveSSOTicket(ssoTicket); //_SSOAuth.RedirectToOnSuccessUrl(ssoTicket, _SSOAuth.GetSSOPortalUrl(ssoTicket)); } catch (System.Exception ex) { Response.Write(ex.Message); } Response.End(); } if (!string.IsNullOrEmpty(encrypedSSORequest)) { _SSORequest = _SSOHelper.DecryptSSORequest(encrypedSSORequest); } else { _SSORequest = null; } if (_SSORequest == null && !string.IsNullOrEmpty(Request.QueryString["FromExternalSystemCall"])) { _SSORequest = new SSORequest(); _SSORequest.LoginType = LoginTypeEnum.AutoLogon; _SSORequest.RequestDate = DateTime.UtcNow; if (Request.UrlReferrer != null) { _SSORequest.ReturnUrl = Request.UrlReferrer.ToString(); //_SSORequest.ReturnUrl = "http://aic0-s2.qcs.qcorp.com/PermissionManagement/OrgUser/Department/DepartmentInquiry.aspx"; } } if (_SSORequest == null || _SSORequest.LoginType == LoginTypeEnum.Logout) { _SSORequest = new SSORequest(); _SSORequest.LoginType = LoginTypeEnum.DirectLogin; _SSORequest.RequestDate = DateTime.UtcNow; _SSORequest.ReturnUrl = ""; } }