hi i am in the process of setting up a custom member section wihtin umbraco. This is for members and not back office users. I have a need to use the default asp.net memebrship provider. So far i have edited the webconfig, and chnaged the UmbracoMembershipProvider to
Lastly i added in the conenction string and pointed both these providers to that (it is an external db). Now when i log into the backoffice I can see my Role (Member Group) (I have also created a test Member Type) however when i try to create a new member it gives me an error. I have checked the database and can see a new entry has been made in the cmsMember table, however i woudl have assumed this should have been made in the database specified in my custom connection string. When i try to click on this newly created user it also gives me an error. I have also notcied that when i try to go to edit the Role (Member Group) I also get an error, but it does get created in the correct database.
Can someone please point me in the right direction as to what i need to do next ?
Should I do anything more? It just seems that adding an asp:login control to my login page won't let me login members I should have allowed through the built myMembershipProvider.dll?! Plz help :)
Forgot to add my dll has one myMembershipProvider class overriding all membership provider methods throwing NotImplementedExceptions...except the ValidateUser that works with my separate DB containing preexisting usernames/passwords...should I of implemented anything more?
I actually figured that one out, but got stuck with an even bigger problem, though once again thanks for helping.
If I could only figure out why in the logged in event (which occurs after logging in, during which my provider's validateuser is successfully called) on my asp:login control won't let me access the currently logged in user with System.Web.Security.Membership.GetUser(); as per this wiki (it alway returns me null - throws an exception)...tia
you might want to try the overload method where by you send the of GetUser, where you send it the email address (or username) of the uiser who successfully managed ot login.
Custom membership provider
hi i am in the process of setting up a custom member section wihtin umbraco. This is for members and not back office users. I have a need to use the default asp.net memebrship provider. So far i have edited the webconfig, and chnaged the UmbracoMembershipProvider to
<add name="UmbracoMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=XXXXXXXXXX" connectionStringName="XXXXXXXX" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" applicationName="XXXXXX" requiresUniqueEmail="true" passwordFormat="Hashed" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" passwordStrengthRegularExpression=""/>
I have also changed the defaulr role provider to
<add name="UmbracoRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="XXXXXXXXX" applicationName="/" />
Lastly i added in the conenction string and pointed both these providers to that (it is an external db). Now when i log into the backoffice I can see my Role (Member Group) (I have also created a test Member Type) however when i try to create a new member it gives me an error. I have checked the database and can see a new entry has been made in the cmsMember table, however i woudl have assumed this should have been made in the database specified in my custom connection string. When i try to click on this newly created user it also gives me an error. I have also notcied that when i try to go to edit the Role (Member Group) I also get an error, but it does get created in the correct database.
Can someone please point me in the right direction as to what i need to do next ?
What's the error?
Hi Slace, i managed to fix the problem, it was basivally because i was redefining the umbraco providers, so i added my own and it all worked.
Hi Malik,
I'm sorry to bother you but I'm trying to build my own membership provider too...
However, I'm unclear as to how exactly...I build my dll...copy it to bin directory...add the line to web.config:
Should I do anything more? It just seems that adding an asp:login control to my login page won't let me login members I should have allowed through the built myMembershipProvider.dll?! Plz help :)
Forgot to add my dll has one myMembershipProvider class overriding all membership provider methods throwing NotImplementedExceptions...except the ValidateUser that works with my separate DB containing preexisting usernames/passwords...should I of implemented anything more?
make sure you set the default provider to your provider
Thanks Malik,
I actually figured that one out, but got stuck with an even bigger problem, though once again thanks for helping.
If I could only figure out why in the logged in event (which occurs after logging in, during which my provider's validateuser is successfully called) on my asp:login control won't let me access the currently logged in user with System.Web.Security.Membership.GetUser(); as per this wiki (it alway returns me null - throws an exception)...tia
you might want to try the overload method where by you send the of GetUser, where you send it the email address (or username) of the uiser who successfully managed ot login.
is working on a reply...