Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script type="text/javascript">
- function revisaVariableSesion() {
- var sesionValida = '<%= Session["sesionValida"] %>';
- if(!sessionValida)
- window.location = "LogOut.aspx";
- }
- var interval = setInterval(
- function () {
- revisaVariableSesion();
- }, 5000);
- </script>
- protected void Page_Load(object sender, EventArgs e)
- {
- try
- {
- Session.Abandon();
- FormsAuthentication.SignOut();
- Response.Cache.SetCacheability(HttpCacheability.NoCache);
- Response.ExpiresAbsolute = DateTime.Now.AddDays(-1d);
- Response.Expires = -1000;
- Response.CacheControl = "no-cache";
- catch (Exception ex)
- {
- Response.Write(ex.Message);
- }
- Response.Redirect("/Login.aspx");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement