public class ben:harrell

July 26, 2006

Web Parts Manager personalization without SQLExpress

Filed under: .NET, Technology — benjamin harrell @ 3:15 pm

Earlier I posted about wanting to put personalization on a separate SQL instance (not local).  Well, this gives me a chance to say thanks to the MSDN2 team for making more information available in .NET 2.0.  I was a little worried during the BETA because of so many empty pages but MSDN is loaded with good information and plenty of walkthroughs!  There is even a MSDN WIKI found here .  OK here is the answer I promised: 

Personalized settings are not tied to a single browser session. Because they are stored in long-term storage, the application can retrieve a user’s settings each time the user visits a specific page.

Personalization uses an ASP.NET application services database to store personalization data. By default, ASP.NET creates this database automatically in a subfolder named “app_data” when an ASP.NET application first uses personalization or one of the other application services such as roles, membership or profiles. Also by default, ASP.NET creates the database as a single SQL Server Express database file that contains the database schema for all of the application services. Using the Web.config file, you can configure your application so that a separate database file is created for personalization. Further, in the Web.config file, you can specify a SQL Server database to store the application services data instead of using the default SQL Server Express database file.

The mechanism for storing and retrieving personalization data consists of a provider component and a data store. ASP.NET includes a default Microsoft SQL provider and database. You can also create a custom provider and configure it to use any data store.  (THANK GOD!  gotta love the new provider model)

essentially this is the web.config section you need under <system.web>

(the MSDN entry is here for the element)

<webParts><personalization ><providers>

<remove name=AspNetSqlPersonalizationProvider />        

<add connectionStringName=my_connection_stringname=AspNetSqlPersonalizationProvider



Some of this was information was found in a really good article on personalization here . 


technorati tags:, , ,



  1. […] There is an excellent post introducing you to the provider model that makes extending and customizing the WebPart technology in ASP.NET 2.0 possible over at Ben Harrell’s blog.  […]

    Pingback by Patrick Altman : Provider Model — July 26, 2006 @ 7:04 pm

  2. Caravan Holidays For The Family

    It is legitimate that locating precise research on this subject can be troublesome.

    Trackback by Caravan Holidays For The Family — August 2, 2007 @ 8:49 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: