0

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?

cp100
  • 1,463
  • 6
  • 20
  • 35

1 Answers1

0

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.

Community
  • 1
  • 1
Juergen Gutsch
  • 1,774
  • 2
  • 17
  • 28