Membership or Role Provider // Provider Model // Factories .. How does MS do it?

Discussion in 'ASP .Net' started by sloan, Jul 3, 2007.

  1. sloan

    sloan Guest

    Ok , first , I'm famaliar with both Providers.

    And the "Factory Design Pattern".

    Basically, if you don't override the default setting via config, you get the
    default SqlRoleProvider or SqlMembershipProvider.

    My question is....... how does MS check to see if you're using a different
    provider.

    Do they run an Xpath against the web.config to see if it exists?

    .........


    I'm more interested in the "They provide a default implementation, but I
    gotta check to see if the default has been overwritten.
    sloan, Jul 3, 2007
    #1
    1. Advertising

  2. sloan

    Chad Scharf Guest

    MS uses reflection against the TypeName you provide for the provider
    (whichever one it is) in that provider's configuration, so if you were using
    a custom MembershipProvider called MyStupendousMembershipProvider, you would
    specify that type name and assembly in the config settings and microsoft
    would pick that up via reflection and make its interface calls via the
    factory pattern to your custom type.

    As far as the default implementation goes, if no configuration exists, then
    the base type is used which is the type provided in the framework as the
    default that has to be overridden in the configuration if you want to use it
    and have your own settings for it which is why you have to "Remove" it and
    then "Add" it again in the config file with your own setting for a custom
    configuration of the default framework provider, whichever it may be.

    "sloan" <> wrote in message
    news:...
    >
    > Ok , first , I'm famaliar with both Providers.
    >
    > And the "Factory Design Pattern".
    >
    > Basically, if you don't override the default setting via config, you get
    > the
    > default SqlRoleProvider or SqlMembershipProvider.
    >
    > My question is....... how does MS check to see if you're using a different
    > provider.
    >
    > Do they run an Xpath against the web.config to see if it exists?
    >
    > ........
    >
    >
    > I'm more interested in the "They provide a default implementation, but I
    > gotta check to see if the default has been overwritten.
    >
    >
    >
    >
    Chad Scharf, Jul 3, 2007
    #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. RedHair
    Replies:
    2
    Views:
    752
    RedHair
    Feb 21, 2006
  2. =?Utf-8?B?QmVuIFIu?=

    debug a custom membership and role provider?

    =?Utf-8?B?QmVuIFIu?=, Mar 27, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    3,821
    =?Utf-8?B?dWxyaWNoIHNjaHVtYWNoZXI=?=
    May 17, 2006
  3. Replies:
    1
    Views:
    434
    Oliver Wong
    Oct 2, 2006
  4. Smokey Grindle

    membership / role provider in a web service?

    Smokey Grindle, May 7, 2007, in forum: ASP .Net
    Replies:
    3
    Views:
    509
    Steve C. Orr [MCSD, MVP, CSM, ASP Insider]
    May 8, 2007
  5. Erich Peterson

    Membership and Role Provider Question

    Erich Peterson, Jul 2, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    363
    Cowboy \(Gregory A. Beamer\)
    Jul 2, 2007
Loading...

Share This Page