RECREATE A SESSION BY USING YOUR SESSION ID

Jayden Bell

Total Post:110

Points:774
Posted by  Jayden Bell
 844  View(s)
Ratings:
Rate this:

I would like to know if ASP.NET has something similar to session_id function from PHP.

I would like to do something like it using ASP.NET:

session_id($_GET['session_name']);

session_start();

if ($_SESSION['mydata'] != 'somepreviousvaluesetted') {

        header("HTTP/1.0 404 Not Found");

        exit;

}

  1. Sumit Kesarwani

    Post:378

    Points:2694
    Re: Recreate a Session by Using Your Session ID

    Hi Jayden, 

    The session object has a SessionID property, but it does not give you the ability to start a session; however, in global.asax, there is a Session_Start handler which fires when the session does start. The session starts when the user accesses the application.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!