custom membership provider

Discussion in 'ASP .Net' started by =?Utf-8?B?QXhmb3Jk?=, Apr 19, 2006.

  1. Hello,

    I am trying to implement my own custom provider for memberships, basically
    only id/pwd (no roles). I use the new login web control (I am using asp.net
    2.0 and VS2005).

    In web.config I followed the examples like:
    <membership defaultProvider="AspNetSqlMembershipProvider2">
    <providers>
    <clear/>
    <remove name="AspNetSqlMembershipProvider2" />
    <add name="AspNetSqlMembershipProvider2" ... etc, etc..

    However when I, in Page_Load of the Login.aspx look at:
    Debug.WriteLine(Membership.Provider.Name);
    the membership in use always turns out to be the machine default of
    AspNetSqlMembershipProvider.

    My settings are therfore ignored.
    What am I doing wrong?

    Thx.
     
    =?Utf-8?B?QXhmb3Jk?=, Apr 19, 2006
    #1
    1. Advertising

  2. Found out something:
    I ran the asp configuration web tool.
    First I got an error.
    Second time my own custom provider was shown under providers, but only when
    choosing 'advanced', otherwise it told me: 'no providers'.

    Now, after this, my Membership object was using the correct provider and my
    settings are used.

    ???



    "Axford" wrote:

    > Hello,
    >
    > I am trying to implement my own custom provider for memberships, basically
    > only id/pwd (no roles). I use the new login web control (I am using asp.net
    > 2.0 and VS2005).
    >
    > In web.config I followed the examples like:
    > <membership defaultProvider="AspNetSqlMembershipProvider2">
    > <providers>
    > <clear/>
    > <remove name="AspNetSqlMembershipProvider2" />
    > <add name="AspNetSqlMembershipProvider2" ... etc, etc..
    >
    > However when I, in Page_Load of the Login.aspx look at:
    > Debug.WriteLine(Membership.Provider.Name);
    > the membership in use always turns out to be the machine default of
    > AspNetSqlMembershipProvider.
    >
    > My settings are therfore ignored.
    > What am I doing wrong?
    >
    > Thx.
     
    =?Utf-8?B?QXhmb3Jk?=, Apr 19, 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. John
    Replies:
    3
    Views:
    4,405
    stribbed
    Jun 21, 2007
  2. sloan
    Replies:
    5
    Views:
    1,539
    sloan
    Jun 4, 2006
  3. Replies:
    0
    Views:
    782
  4. sloan
    Replies:
    1
    Views:
    558
    Chad Scharf
    Jul 3, 2007
  5. Brett Ossman

    Custom Membership Provider - Custom Error Messages

    Brett Ossman, Mar 11, 2009, in forum: ASP .Net Security
    Replies:
    0
    Views:
    811
    Brett Ossman
    Mar 11, 2009
Loading...

Share This Page