我有一个 ASP.Net 登录
if (Membership.ValidateUser("User", "Password"))
{
FormsAuthentication.SetAuthCookie("Testuser", false);
Response.Redirect("TestingAuthNewTestPage.aspx");
}
这工作正常。我到了silverlight页面。
然后,如果我想注销,我尝试使用 FormsAuthentication.SignOut(),但在我的 silverlight 应用程序中,我无法访问 FormsAuthentication?
它起作用的唯一方法是如果我打电话:
WebContext.Current.Authentication.Logout();
这是退出的好方法吗?或者我如何访问 FormsAuthentication 类?
谢谢