ASP.NET  •  Configure Personalization

Listing 7. Personalization in ASP.NET 2 provides a quick way to capture and store user preferences. You get IntelliSense immediately after saving the web.config file, because configuration information is compiled into a Profile class automatically.

<personalization enabled="true"
   defaultProvider="AspNetSqlProvider2" >
   <providers>
      <add name="AspNetSqlProvider2"
         type="System.Web.Personalization.
            SqlPersonalizationProvider, 
            System.Web, Version=1.2.3400.0, 
            Culture=neutral, 
            PublicKeyToken=b03f5f7f11d50a3a"
         connectionStringName=
            "AspNetConnectionString"
         applicationName="/"
         description="Stores and retrieves 
            personalization data from the local 
            Microsoft SQL Server database 
            file" />
   </providers>
   <profile>
      <property name="Name"/>
      <property name="FavoriteClubs" />
      <property name="MemberSince" />
      <property name="Skin" />
      <property name="ReceiveNewsletter" />
   </profile>
</personalization>