I want to detect session timeout inside mvc action method. I know that I can use Authorize attribute to detect it. But I don't want to use it at this moment.
public async Task<ActionResult> Check()
{
return View();
}
Is there any way to achive this kind of thing?
It seems there are now ActionFilter for async MVC methods: Async action filter in MVC 4
Try to authorize inside the action or call a authorize method inside async actions.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.