Profiles

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9u?=, May 17, 2006.

  1. Hi,

    My question is about the new ProfileProvider class in ASP.NET 2.0
    and what its limits are.

    Can you have multiple Providers with unique properties to each be defined
    in the web config file and also group them as such.

    example as follows

    <profile defaultProvider="MyProfile_ProfileProvider">
    <providers>

    <add name="MyProfile_ProfileProvider"
    connectionStringName="LocalSqlServer"
    applicationName="/"
    type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    <add name="MyProfile1_ProfileProvider"
    connectionStringName="LocalSqlServer"
    applicationName="/"
    type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    <add name="MyProfile2_ProfileProvider"
    connectionStringName="LocalSqlServer"
    applicationName="/"
    type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
    Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>

    </providers>
    <properties>

    <group name="Users">
    <add name="FirstName"
    provider="MyProfile_ProfileProvider"/>
    <add name="LastName"
    provider="MyProfile_ProfileProvider"/>
    <add name="Accounts"
    provider="MyProfile_ProfileProvider"
    type="System.Collections.ArrayList"/>
    </group>

    <group name="Customers">
    <add name="CustomerName"
    provider="MyProfile1_ProfileProvider"
    allowAnonymous="true" />
    <add name="AccountNumber"
    provider="MyProfile1_ProfileProvider"/>
    <add name="Contact"
    provider="MyProfile1_ProfileProvider"/>
    </group>

    <group name="ServiceProviders">
    <add name="ServiceProviderName"
    provider="MyProfile2_ProfileProvider"/>
    <add name="AccountNumber"
    provider="MyProfile2_ProfileProvider"/>
    <add name="Contact"
    provider="MyProfile2_ProfileProvider"/>
    </group>

    </properties>
    </profile>
    =?Utf-8?B?Um9u?=, May 17, 2006
    #1
    1. Advertising

  2. =?Utf-8?B?Um9u?=

    Guest

    I have asked the same question in the asp.net forums, but have recieved
    no reply. My intent is to use double providers for the sake of
    creating a routie to migrate from one provider store to the other!

    UNfortunatley due to time constraints, it was necessary to go live
    prior to adopting the new provider. Now that it's in place we need a
    way to tranfer the existing valid live data from the serializable
    tables to our new "In The Clear" SQLTableProfileProvider.

    Anyone?


    Ron wrote:
    > Hi,
    >
    > My question is about the new ProfileProvider class in ASP.NET 2.0
    > and what its limits are.
    >
    > Can you have multiple Providers with unique properties to each be defined
    > in the web config file and also group them as such.
    >
    > example as follows
    >
    > <profile defaultProvider="MyProfile_ProfileProvider">
    > <providers>
    >
    > <add name="MyProfile_ProfileProvider"
    > connectionStringName="LocalSqlServer"
    > applicationName="/"
    > type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
    > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    >
    > <add name="MyProfile1_ProfileProvider"
    > connectionStringName="LocalSqlServer"
    > applicationName="/"
    > type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
    > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    >
    > <add name="MyProfile2_ProfileProvider"
    > connectionStringName="LocalSqlServer"
    > applicationName="/"
    > type="System.Web.Profile.SqlProfileProvider, System.Web, Version=2.0.0.0,
    > Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    >
    > </providers>
    > <properties>
    >
    > <group name="Users">
    > <add name="FirstName"
    > provider="MyProfile_ProfileProvider"/>
    > <add name="LastName"
    > provider="MyProfile_ProfileProvider"/>
    > <add name="Accounts"
    > provider="MyProfile_ProfileProvider"
    > type="System.Collections.ArrayList"/>
    > </group>
    >
    > <group name="Customers">
    > <add name="CustomerName"
    > provider="MyProfile1_ProfileProvider"
    > allowAnonymous="true" />
    > <add name="AccountNumber"
    > provider="MyProfile1_ProfileProvider"/>
    > <add name="Contact"
    > provider="MyProfile1_ProfileProvider"/>
    > </group>
    >
    > <group name="ServiceProviders">
    > <add name="ServiceProviderName"
    > provider="MyProfile2_ProfileProvider"/>
    > <add name="AccountNumber"
    > provider="MyProfile2_ProfileProvider"/>
    > <add name="Contact"
    > provider="MyProfile2_ProfileProvider"/>
    > </group>
    >
    > </properties>
    > </profile>
    , Jun 5, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Alexandr Zverev

    User Profiles and ASP 2.0

    Alexandr Zverev, Aug 1, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,208
    Brock Allen
    Aug 2, 2005
  2. Replies:
    0
    Views:
    496
  3. =?Utf-8?B?Um9ja3k=?=

    Delete User Profiles via ASP.net webform using VB.net

    =?Utf-8?B?Um9ja3k=?=, Jan 19, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    450
    =?Utf-8?B?Um9ja3k=?=
    Jan 19, 2006
  4. VDevelopment

    Profiles in ASP.NET 2.0

    VDevelopment, Jan 28, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    359
    VDevelopment
    Jan 28, 2006
  5. Saber

    Profiles ASP.Net 2 - Error :(

    Saber, Feb 9, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    399
    Saber
    Feb 9, 2006
Loading...

Share This Page