Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7504693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T21:39:26+00:00 2026-05-29T21:39:26+00:00

I have an asp.net web application where the sessionstate mode is InProc. For Inproc,

  • 0

I have an asp.net web application where the sessionstate mode is “InProc”. For Inproc, by default the session expiry is 20minutes. I would like to display a session expiry countdown popup for one minute before the session expires. But i cant find a property that says how many mimutes has goneby. How to know if it is the 19th minute.
Right now i am doing like below:

if (Context.Session != null)// Check whether the session is null
             { 
              if (Session.IsNewSession)// If the session is null, check whether the session is new
               {
               Response.Redirect("../SessionTimeout.aspx");//Redirect to time out page
               }
             }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T21:39:33+00:00Added an answer on May 29, 2026 at 9:39 pm

    you can use some ajax to accomplish this.
    here is a possible solution:

    <script type="text/javascript">
    
        function checkAuthenticated() {
            {
                $.ajax({
                    type: "POST",
                    url: "CheckAutheticated.asmx/checkAuthenticated",
                    data: "{}",
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    success: checkAuthenticatedOk,
                    error: checkAuthenticatedError
                });
            }
        }
        function checkAuthenticatedOk() { }
        function checkAuthenticatedError() {
            $("#sessionExpiredCover").show();
        }
        </script>
        <style type="text/css">
        #sessionExpiredCover {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 100000;
        display: none;
        background-color: #fff;
        /*opacity: .7;
        filter:progid:DXImageTransform.Microsoft.BasicImage(opacity=.7);*/
        }
        </style>
    
    <div id="sessionExpiredCover">
        <div style="background-color:#fff; margin:100px; height:200px; width:400px;"><h1>Session expired</h1>
            <br />
            <asp:HyperLink NavigateUrl="~/Login.aspx" runat="server" Text="Please log in again" />
        </div>
    </div>
    

    then you have to develop your countdown code in the WebMethod:

    <%@ WebService Language="C#" Class="CheckAutheticated" %>
    
    using System;
    using System.Web;
    using System.Web.Services;
    using System.Web.Services.Protocols;
    
    [WebService(Namespace = "http://tempuri.org/")]
    [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
    // To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment     the following line. 
    [System.Web.Script.Services.ScriptService]
    public class CheckAutheticated  : System.Web.Services.WebService {
    
    [WebMethod]
    public string checkAuthenticated()
    {
       //your countDownCode 
       return "authenticated";
    }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In ASP.NET application's web.config, I have something like this <sessionState mode=InProc cookieless=false timeout=30/> Is
I have Web Application in asp.net. Where I am maintaining Session for every User.
I have a asp.net web application which has a number of versions deployed on
I have an ASP.NET web application which does the following: Reads an Excel file.
I have one asp.net web application. It is using two membership provider. Two sign-in
I have an ASP.NET web application the entire site is browsed over HTTPS using
I have an asp.net web application written in C# using a SQL Server 2008
We have an ASP.NET web application hosted by a web farm of many instances
I have a ASP.NET web application which has more than 100 pages. Each page
I have an ASP.NET web application and I want to be able to take

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.