1
사용자 정의 폼 인증을 사용하는 실버 라이트 애플리케이션이 있습니다. 브라우저 창이 닫히면 어떻게 로그 아웃 할 수 있습니까? Silverlight 응용 프로그램에서 앱 종료시 로그 아웃하는 방법은 무엇입니까?
나는이 같은 시도 :public App()
{
Startup += ApplicationStartup;
Exit += Application_Exit;
UnhandledException += ApplicationUnhandledException;
var webContext = new WebContext {Authentication = new FormsAuthentication()};
ApplicationLifetimeObjects.Add(webContext);
InitializeComponent();
}
private void ApplicationStartup(object sender, StartupEventArgs e)
{
Resources.Add("WebContext", WebContext.Current);
RootVisual = new MainPage();
}
private void Application_Exit(object sender, EventArgs e)
{
WebContext.Current.Authentication.Logout(false);
}
을하지만이 작동하지 않았다. Ewery 시간 브라우저를 닫을 때 예외가 발생합니다. AsyncCallback에서 예외없이 예외가 발생했습니다.
이 문제는 어떻게 처리합니까?