Powered by Blogger.

Saturday, February 15, 2014

ASP.NET provider model tutorial:

In this post we will discuss about ASP.NET provider model. Also you can check out my previous posts on:

- Different Methods in SqlRoleProvider class in Asp.Net

- Extensions method in C#.Net

- Tutorial on MVVM with WPF

The ASP.NET provider model is an important framework to understand as you build your applications. The ASP.NET provider model was a major change introduced back with the release of ASP.NET 2.0.

The simple nature of this model means that requests come in and then responses are sent back. On top of that, ASP.NET does not differentiate one request from another. The server containing an ASP.NET application is simply reacting to any request thrown at it.

A provider is an object that allows for programmatic access to data stores, processes,and more.

The available providers for storing session information include


This provider model was an object that sat between the Session object and the actual place in which the sessions were stored. By default, sessions in ASP.NET are stored InProc, meaning in the same process where ASP.NET is running.

Besides InProc, you can use StateServer that enables you to store sessions in a process that is entirely separate from the one in which ASP.NET runs. This protects your sessions if the ASP.NET process shuts down.