0
Je dois prendre du recul sur celui-ci et recommencer ... Je veux charger les valeurs dans un comboBox à travers mon ViewModel basé sur l'utilisateur connecté. J'utilise FA est-ce le meilleure méthode? Puis-je accéder au cookie directement à partir du ViewModel?Persistant FormsAuthentication Utilisateur à travers MVVM Silverlight App
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(1,
user,
DateTime.Now,
DateTime.Now.AddDays(30),
false,
"Role One",
FormsAuthentication.FormsCookiePath);
// Encrypt the ticket.
string encTicket = FormsAuthentication.Encrypt(ticket);
// Create the cookie.
Response.Cookies.Add(new HttpCookie(FormsAuthentication.FormsCookieName,
encTicket));
// Show the Silverlight control
Response.Redirect("Default.aspx");