Chapter 12. Introduction to the Provider Model

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 in ASP.NET 2.0, so you probably already know that ASP.NET is a way to build applications for the Internet. For the Internet means that an application's display code travels over HTTP, which is a stateless protocol. ASP.NET works with a disconnected architecture. 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.

This means that a developer building a Web application has to put some thought into how users can remain in context between their requests to the server as they work through the application. Keeping a user in context means recording state, the state of the user, to some type of data store. This can be done in multiple ways, and no one way is the perfect way. Rather, you have to choose one of the available methods.

You can read about maintaining state in an ASP.NET application in Chapter 22.

State can be stored via multiple methods, some of which include:

  • Application State

  • Session State

  • The Cache Object

You use all these methods on the server, but you can also employ your own custom methods — such as simply storing state in a database using your own custom schema. It is also ...

Get Professional ASP.NET 3.5 SP1 Edition: In C# and VB now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.