I need to show a message when the session of the cookie ends but I do not know how to do it.
<authentication mode="Forms">
<forms loginUrl="~/Home/Login" timeout="10" slidingExpiration="true" name="KeyAuth" />
</authentication>
I thought I would do a modal in the Login view and send a special message to know when it is by timeout and when it is common logout but I do not know how to do it.
Thank you very much already.
Greetings.
I update:
I got a logout by timeout in this way.
protected void Application_EndRequest(object sender, EventArgs e)
{
if ((Response.StatusCode == 302) && Response.RedirectLocation.Contains("?ReturnUrl="))
{
}
}
in the Globalasax now the problem is that I do not know how to get to the view to show this modal
<div id="dialogboxLogin" class="modal hide fade" ng-class="'modal_dialog'">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3><span>Administración</span></h3>
</div>
<div class="modal-body">
<p>
<span class="multiline">Su sesion ha expirado</span>
</p>
</div>
<div class="modal-footer">
<a class="btn btn-close" onclick="javascript: $('#dialogboxLogin').modal('hide');">Cerrar</a>
</div>
</div>
This modal is in the login view.