Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple DBs with a custom DNN Membership ProviderMultiple DBs with a custom DNN Membership Provider
Previous
 
Next
New Post
10/5/2007 6:49 PM
 

I've been working on creating a custom DNN membership provider which will have the user table contained in another db but maintain the user joining tables (UserPortals, UserRoles) in DotNetNuke.  I am running into the following problems:

1.) Little to NO documentation on creating a custom DNN membership provider

2.) I'm not sure if DotNetNuke.Security.Membership.Data.DataProvider abstract class is used in more than just the configured MembershipProvider.  With the reflection use throught DNN I'll have to look through all of the code to find out who uses this class and if this class is required for a membership provider implementation.  I've already found the default role provider does use this.  This has a major impact on my design.  If I can just implement a custom DNN membership provider then I can encapsulate my logic into the membership provider and not have to worry about a static datalayer class.

3.) Why are the base DataProvider.GetInstance and static constructors pretty much hardcoded to SqlDataProvider?  I want to use the other SqlDataProvider for everything besides membership so I can't  change the DefaultProvider attribute on the data node.  But since this constructor is hardcoded to use reflection, irony anyone, to create the SQLDataProvider I will have to create a new static constructor on the concrete class.  Why not just add another property to the data node or to the membership node?

It seems like there are no extensibility points in the membership provider.  You pretty much have to build your db and code exactly like what is already done, which begs the question why even make this configurable and extensible.  My example should be a common hook, to have user data stored elsewhere and role data stored in dnn. 

 
New Post
10/8/2007 12:46 PM
 

anyone?

 
New Post
12/18/2007 5:02 PM
 

So my end solution is as follows:

1.) Copied and pasted the AspNetMembershipProvider class

2.) Wrote my own stored procedure to insert users into dnn that specifies a userId.

3.) Rewrote the CreateDNNUser method to use the new insert stored procedure.  Rewrote the CreateMemberhipUser method to insert into my custom db.  Yes that is CreateMemberhipUser not CreateMembershipUser, result of step 1.

4.) Hardcoded the install SuperUser and portal admin accounts to int.MaxValue & int.MaxValue -1 due to some sweet logic in the install module that aparently thinks that if a a user id is less than 1 then it is an error. 

5.) Wrote a custom User screen using the UserController.

6.) Convinced the client that  Dot Net Nuke was a piece of junk and that all of their future projects should not even consider DNN.

 

 
New Post
12/19/2007 4:10 PM
 

I'm about to do the same thing.  So you inherited from System.Web.Security.MembershipProvider?

Did you compile your Membership Provider as its own dll?

I have written a ton of membership providers for asp.net 2.0 sites but this is my first DNN site.  Any guidance you can provide is appreciated.  [I know, not what you intended when you opened this thread!]

 

Brian

 


Chicago Data Solutions logo
Brian Begy
Managing Partner
Chicago Data Solutions
 
New Post
12/20/2007 9:45 AM
 

Zambonilli wrote

It seems like there are no extensibility points in the membership provider.  You pretty much have to build your db and code exactly like what is already done, which begs the question why even make this configurable and extensible.  My example should be a common hook, to have user data stored elsewhere and role data stored in dnn. 

We are considering DNN for a huge switch over project but it is issues like this and the issue of pushing modules down through portals which may be the deal breaker for us. 

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Multiple DBs with a custom DNN Membership ProviderMultiple DBs with a custom DNN Membership Provider


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out