Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Geeks !!

I am having problem with session
that is expiring whenever user is active and working something on page i have made this code on master page
C#
protected void Page_Load(object sender, EventArgs e)
       {
           try
           {
               if (Session[EmPId] == null)
               {
                   Response.Redirect(~/Default.aspx, false);
               }
               else
               {
                   Emptr = Convert.ToInt32(Session[EmPId]);
               }



           }
           catch (Exception ex)
           {

           }
       }





on a page i have made this code

C#
protected void Page_Load(object sender, EventArgs e)
       {
           try
           {
               if (Session[EmPId] == null)
               {
                   Response.Redirect(~/Default.aspx, false);
               }
               else
               {
                   Emptr = Convert.ToInt32(Session[EmPId]);
               }



           }
           catch (Exception ex)
           {

           }
       }






and my web.config file is like this

XML
<sessionState timeout="50000"></sessionState>


my this page 's master page is set above master page

i am in a big trouble due to this problem as its too irritating for a user.

thanks in advance...
Posted

1 solution

 
Share this answer
 
Comments
Er. Bhanu Pratap Singh 11-Dec-13 2:44am    
i already read it but i want a permanent solution.. because its hammering

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900