Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > custom membership provider

Reply
Thread Tools

custom membership provider

 
 
=?Utf-8?B?QXhmb3Jk?=
Guest
Posts: n/a
 
      04-19-2006
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.
 
Reply With Quote
 
 
 
 
=?Utf-8?B?QXhmb3Jk?=
Guest
Posts: n/a
 
      04-19-2006
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Membership Provider - Custom Error Messages Brett Ossman ASP .Net Security 0 03-11-2009 09:33 PM
Membership or Role Provider // Provider Model // Factories .. How does MS do it? sloan ASP .Net 1 07-03-2007 08:17 PM
Custom membership provider problem John ASP .Net 3 06-21-2007 02:04 AM
Unable to redirect when using custom 'Login' with custom 'Membership provider' asnowfall@gmail.com ASP .Net 0 06-05-2007 05:15 PM
Deploying 2.0 app on a Service Provider .. Membership Provider sloan ASP .Net 5 06-03-2006 11:20 PM



Advertisments