Geeks With Blogs
Kaleidoscope Everything under the sun, ending in .Net

ASP.NET session state lets you associate a server-side string or object dictionary containing state data with a particular HTTP client session. A session is defined as a series of requests issued by the same client within a certain period of time, and is managed by associating a session ID with each unique client. The ID is supplied by the client on each request, either in a cookie or as a special fragment of the request URL. The session data is stored on the server side in one of the supported session state stores, which include in-process memory, SQL Server™ database, and the ASP.NET State Server service. The latter two modes enable session state to be shared among multiple Web servers on a Web farm and do not require server affinity.

Implement Custom session Handler you need to follow following process :

1. Create class library which will inherit from  SessionStateStoreProviderBase abstract Class.

2. Implement all abstract Method in your base class.

3.Use Hashtable collection   in you class file to save session details.

4.Change Mode of session to “Custom” in web.config file and provide Provider as your Namespace with classname.

<sessionState mode=”Custom” customProvider=”Namespace.classname”>

<Providers>

<add name=”Name” type=”Namespace.classname”>

</sessionstate>

For more Details Please refer following links :

 

http://msdn.microsoft.com/en-us/magazine/cc163730.aspx

http://msdn.microsoft.com/en-us/library/system.web.sessionstate.sessionstatestoreproviderbase.aspx

-

Chandraprakash

Posted on Thursday, March 25, 2010 8:42 PM | Back to top


Comments on this post: Custom Session Management using HashTable

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © kaleidoscope | Powered by: GeeksWithBlogs.net