Jul 22, 2007 - 12:12 PM
User tracking depends mainly on how your web page is set up? Is it using anonymous access? Do you use impersonation? Do you use windows log on? Etc. Cookies would be a mechanism to allow you to save i.e. a user id on the user's machine and transmit it to your web server etc.
One really good page with samples and how to get started is: http://samples.gotdotnet.com/quicksta...
Jul 24, 2007 - 10:00 AM
Session is a special type of variable or object that is used in state management in web applications. A web application works as a disconnected or asynchronized architecture as when a client request a page the web server hosting the requested application serves the requested page to client and then it doesn’t know about who has requested a page or if the client sends another request to server or web application it doesn’t know if the same client has sent request prior to this one.
So now in the given scenario for any dynamic web application if the application needs to track the client or user for processing, there should be some way to track the users. The web application has two most common ways to do the same, Cookies and Session.
Cookies and Session are different as
• Cookies are a piece of information stored at client machine in small files where as the session is maintained by server.
• Cookies can persist long for several days but Session has a smaller life span and at the max for one session of a browser.
Our emphasis here will be on Session only. We are not talking about any specific web technology here as the concept discussed here holds true for most of the web technologies. Just the syntax and semantics of a language differs.
The life span of a Session is for one browser session only, that means the session will be maintained till one browser session is on and the moment browser is closed the session for that particular browser ends. The web application fires two event in relation with Sessions such as Session_Start() and Session_End(). The names of events might differ for different programming language used. Session_Start is called when user sends a request for a web page for first time to the application and Session_End is called when the user closes the browser. So these events can be used for variable initialization and clean up jobs.
For the Session variables that developer creates to use in the application the developer decides the life span, so it comes into existence when developer explicitly creates them and goes out of scope when developer destroys it. If in any case if the developer forgets to destroy or do a clean up on session variable that he has created, the Session variable will still be lying alive with server and will be cleaned up if server or application restarts or the clean up process is run.
When is it created
Session is created when user sends a first request to the server for any page in the web application, the application creates the Session and sends the Session ID back to the user with the response and is stored in the client machine as a small cookie. So ideally the "machine that has disabled the cookies, session information will not be stored".
When is it destroyed
The Session is destroyed the moment you close the browser at user end. For the new request a new Session will be created and the Session id will be sent to the client machine. Two different browser opened on the same machine will cause creation of two separate Session, one for each browser if they call the same web application. Though the browser Session comes to the end when user closes the browser however there is no way for the server to get if the information if the user has closed the browser so the Session is still alive at the server. If the server doesn’t get another request from the user for the time specified for Session timeout then the Session will be timed out and later will be cleaned up.
Where is it created
Session creation place is a big question for most of us. But it is simple that the Sessions are created at server, it takes up server resources and the Session ID is stored as a small piece in Cookies at client end. So it will remove it from user’s machine when the particular browser is closed. And from server for general Session it will destroy when user closes the browser and session reaches the timed out state. But if developer specifically creates Ses
Jul 24, 2007 - 11:59 AM
that's an interesting web page where you copied this from. If someone wants to have a look:
Aug 03, 2007 - 08:16 PM
Oct 31, 2008 - 08:51 PM
how to create that ....
please send me the link or answer it very urgent
Oct 31, 2008 - 10:14 PM
You should ask this question as a new one, this will make it easier for the experts to see it and respond quickly to you.
Apr 14, 2009 - 05:06 AM
u can use the session in this manner
May 06, 2009 - 07:35 AM
The Quomon Team
Aug 02, 2011 - 03:37 AM
enter this page i hope find yr solution