I am using Timeout Dialouge plugin in asp.net MVC web app from https://github.com/rigoneri/timeout-dialog.js for showing a session timeout popup countdown.
In my layout page I have following JS call:
@if (User.Identity.IsAuthenticated)
{
<script type="text/javascript">
$(document).ready(function () { $.timeoutDialog({ timeout: 1200, countdown: 60, logout_redirect_url:'../Account/LogOff', restart_on_yes: false }); });
</script>
}
Notice the "logout_redirect_url:'../Account/LogOff'" part, Account is Controller & LogOff is Action. The countdown timer shows as expected but it does not redirects to LogOff action and reloads the active page again.
Am I doing something wrong here?