Introduction

In this article we will try to see what are the different ways we can manage sessions in an ASP.NET application. When should we use which techniques and what are the pros and cons of using each technique.

Background

The basic stateless nature of web sites and web applications are rather very confusing to anyone who is starting with web development. ASP.NET provides various ways of handling the states. The basic overview of all the state management techniques can be found here.

In this article we will specifically be discussing the Session management techniques. Session are the server side method of managing the state of an application i.e. all the web applications' state related info will be stored on server side if we use this technique. The benefit of having this technique is that since we are keeping all the state related information on server, the request and response becomes lightweight. Also, the chances of someone intercepting or changing this data is also reduced. But this technique does involve more resource usage on the server.

The advantages of using Session State are

Better security
Reduced bandwidth

The disadvantages of using Session state are

More resource consumption of server.
Extra code/care if a Web farm is used(we will discuss this shortly)

Let us start looking into how we can use the Session state in our application and see how we can configure it to use various techniques


Read More...


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too. 

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.