AccountControllerでログアウトする方法があるAsp.netMVC3アプリケーションに取り組んでいます。
public ActionResult LogOff()
{
try
{
// Session.User = null;
this._authenticationService.SignOut();
return RedirectToAction("Login", "Account");
}
catch (Exception e)
{
return View("Error");
}
}
global.asax.csのSession_Endメソッドからこのメソッドを呼び出したい、またはRedirectToAction("Login", "Account");
global.asax.csファイルから呼び出す他の方法はありますか。