Raphael just check the section variable, if there is any session with the valid ID, it allows access when it does not redirect.
As we know the best and safest way to transfer information between different forms in ASP.NET is using Session variables. In Session variables we can store any type of object, from robust DataSets to simple integers and / or strings.
The only problem with these variables is that as we are creating new variables, our application is getting slower and requiring more server resources. It is therefore advisable to remove the variables as we no longer need them.
Because Visual Studio's Intelissense does not identify the session variables we declare, we sometimes forget to remove a particular variable, which can lead to serious performance problems, and even generate execution errors in our application.
For this we will create a routine that will scan the collection of Session variables and show us the name of each, and the value / type of each session variable declared in our application.
To do this, add a new aspx form in your project called ver_session.aspx,
In the Load event of our page, add the following code:
Okay, now as we run our application, we can open a new tab / browser window and directly access the page ver_session.aspx, from our application. In it we have the name and value of each Session Variable!
Withdrawn from.