Advertisement
Guest User

Untitled

a guest
Jul 29th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.54 KB | None | 0 0
  1.     private void RedirectToProperPage(Guid virtualUserId)
  2.     {
  3.         string myImmoboxHomeUrl = System.Configuration.ConfigurationManager.AppSettings["FrontendWeb"];
  4.         if (!string.IsNullOrEmpty(myImmoboxHomeUrl))
  5.         {
  6.             myImmoboxHomeUrl = Calcul.AddTickTimeToUrl(myImmoboxHomeUrl);
  7.             myImmoboxHomeUrl = Calcul.AddKeyValueToUrl(myImmoboxHomeUrl, UrlRewriteModule.VirtualUserKey, virtualUserId.ToString());
  8.             Response.Redirect(myImmoboxHomeUrl, true);
  9.         }
  10.     }
  11.     protected void impersonation_Click(object sender, EventArgs e)
  12.     {
  13.         //UserContext context = new UserContext();
  14.         //context.AddProperty(CookieUserKey.UID, m_Order.EndUserId.ToString());
  15.         //context.AddProperty(CookieUserKey.Type, AuthenticationType.FullAuthenticated.ToString());
  16.         //context.AddProperty(CookieUserKey.Mode, Calcul.GetCookieValueForRememberMe(false));
  17.         //context.AddProperty(CookieUserKey.LLD, ParseManager.Instance.DateAndTimeToString(DateTime.Now));
  18.         //context.AddProperty(CookieUserKey.Version, System.Configuration.ConfigurationManager.AppSettings["CookieVersion"]);
  19.         //context.AddProperty(CookieUserKey.IsImpersonator, bool.TrueString);
  20.         //FillEndUserProfileInfoIntoUserContext(context);
  21.         //string domain = System.Configuration.ConfigurationManager.AppSettings["FrontendWebDomain"];
  22.         //SessionManager.Instance.SaveSession(context, "235D90D9-3DAB-4638-994B-62DE21B4A673", domain);
  23.         //RedirectToProperPage();
  24.         Guid virtualUser = ServiceChannelManager<IUserService>.GetChannel("basicHttp_UserService").VirtualUserInsert(m_Order.EndUserId);
  25.         RedirectToProperPage(virtualUser);
  26.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement