I need to implement a custom membership provider that validate users from an external database. From what I've learned so far it shouldn't be much more work than create a class that inherits from umbraco.providers.members.UmbracoMembershipProvider and overrides the ValidateUser() function.
The next thing you do is to change the type of the membership provider to the namespace that my custom membership provider is in.
My question is how web.config knows where to look for this file? Do I need to recompile the source code or should I just put the class that I created in the main folder for my umbraco project?
So if you've created your custom membership provider by creating a class like this:
using System; using System.Web.Security;
namespace My.Library {
public class MyMembershipProvider : MembershipProvider {
}
}
And implemented the members/functions you need, specifically:
public override bool ValidateUser(string username, string password) {}
You then just need to update the web.config with the correct assembly info and make sure the membership provider is available to it (either as a compiled class library or as a class in app_code). Now either update the existing membership provider or add your own (and point the defaultProvider to it)
Custom Membership Provider
Hi
I need to implement a custom membership provider that validate users from an external database. From what I've learned so far it shouldn't be much more work than create a class that inherits from
umbraco.providers.members.UmbracoMembershipProvider
and overrides the ValidateUser() function.The next thing you do is to change the type of the membership provider to the namespace that my custom membership provider is in.
My question is how web.config knows where to look for this file? Do I need to recompile the source code or should I just put the class that I created in the main folder for my umbraco project?
Hi Marcus
did you figure this out? Im on the same boat and clueless at this point...
So if you've created your custom membership provider by creating a class like this:
using System;
using System.Web.Security;
namespace My.Library
{
public class MyMembershipProvider : MembershipProvider
{
}
}
And implemented the members/functions you need, specifically:
public override bool ValidateUser(string username, string password) {}
You then just need to update the web.config with the correct assembly info and make sure the membership provider is available to it (either as a compiled class library or as a class in app_code). Now either update the existing membership provider or add your own (and point the defaultProvider to it)
<membership defaultProvider="MyMembershipProvider" userIsOnlineTimeWindow="15">
<providers>
<clear /><add name="MyMembershipProvider" type="My.Library.MyMembershipProvider" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="4" useLegacyEncoding="true" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" defaultMemberTypeAlias="Member" passwordFormat="Hashed" />
is working on a reply...