News


Tip-Of-The-Day: <clear/> When Adding Providers in ASP.NET

Scott Guthrie points out a common gotcha when adding a customer provider in your web.config and an easy fix.

The <providers> section within the web.config file is implemented as a collection, and so it is possible to register multiple providers at the same time (this is useful when you want to have some users authenticated using one Membership store, and others authenticated using a separate Membership store).

By default ASP.NET 2.0 registers a set of default SQL Express providers within the root web.config file on your machine that create a SQL Express database within your /app_data directory to store/manage membership/role/profile data when you first access it.  Because this is registered at the machine-wide level, all provider collections by default inherit this registration.  Unless you explicitly <clear/> or override the inherited value, your application will have this default membership/role/profile provider registered.

  • Share This Post:
  • Share on Twitter
  • Share on Facebook
  • Share on Technorati
Wednesday, November 22, 2006 7:00 AM

Feedback

No comments posted yet.


Post A Comment
Title:
Name:
Email:
Website:
Comment:
Verification: