custom membership provider

G

Guest

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.
 
G

Guest

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.

???
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top