0
이 단계를 다시 시작하고 다시 시작해야합니다. 로그인 한 사용자를 기반으로하는 내 ViewModel을 통해 comboBox에 값을로드하려고합니다. FA를 사용하고 있습니다. 가장 좋은 방법은? ViewModel에서 쿠키에 직접 액세스 할 수 있습니까?MVVM Silverlight App 전체에서 FormsAuthentication 사용자 유지
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");