tags:

views:

58

answers:

4

but session variables are stored at the server

so how does the server keep reocrd of whose session has timed out.

is any cookie used at the client side?

+2  A: 

Yes, cookies are typically used on the client side (but you can also use cookieless sessions, which will encode the Session ID in the urls)

The cookie itself however, has nothing to do with the timeout. The server simply times out the Session when it has not received any request from the client with a particular session for a specified time (the Session timeout).

driis
+1  A: 

The session time out can be set in your web.config or in IIS, it is set to 20 minutes by default, and will expire if it has been inactive for this amount of time. Cookies have a timeout that is explicitly set and created by the developer, when the date/time is reached it will automatically expire.

alt text

Monkieboy
+1, would give more pluses :) for complete image, helped a lot
+2  A: 

A cookie is stored on the client with some kind of session id. This tells the server which session it's using. The time out of the session happens on the server. After the timeout if the client sends that same cookie the server says the session is invalid.

Davy8
+1 for scenerio
+1  A: 

You can do two things...

  1. Use timeout in web.config, can also use timespan--20 minutes is default, also The timeout attribute cannot be set to a value that is greater than 525,601 minutes (1 year) for the in-process and state-server modes.

  1. For ASP.net 2.0 Open the IIS management snapin, click Application Pools and select the Application pool for your particular application.

Right Click on that application pool and select Properties.

In the Performance tab, Set the idle timeout for your desired minutes for "shutdown worker processes after being idle for ..... minutes".

Nick

Nicholas Mayne
+1 for specifying limits