Summary


As I explained at the beginning of this chapter, this was an extremely code-heavy chapter. Even though one of the most significant additions to ASP.NET 2.0 is the fact that virtually everything is faster, easier, and achievable with less codeyou can still roll up your sleeves and get down in it.

This chapter showed you that, with a little bit of effort in the creation of your own custom providers, you can do some up-front work that will allow you to create sites that will seamlessly plug into your own authentication, membership, roles and profile stores, regardless of where they're stored or how they're stored. ASP.NET's core utilizes the provider model for everything, so as long as your code inherits from one of the base provider classes, your code will cooperate fully with ASP.NET. You saw custom XML-based implementations of the ProfileProvider class, the RoleProvider class, and the MembershipProvider class as well as introductions to the SiteMapProvider class and the SessionStateStoreProviderBase class.

When creating custom providers, you can find the list of requirements for a given provider in its associated interface. For example, IMembershipProvider tells you everything you need to know in order to create your own membership provider.

You also saw a good example of using partial classes. The implementations of the providers were split into multiple files: one file containing the strict interface implementation and the other file containing private utility methods. This is done to make the code easier to read and maintain.

After completing this chapter, you should have a thorough knowledge of how all of the various ASP.NET 2.0 providers work as well as how to implement your own. You should also be able to determine when you need to create your own and when you can rely on the existing providers that come with ASP.NET 2.0.



Microsoft Visual C# 2005 Unleashed
Microsoft Visual C# 2005 Unleashed
ISBN: 0672327767
EAN: 2147483647
Year: 2004
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net