Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

PortalWebHosting
  Ads  
Aspose - The .NET & Java component publisher
 


  Sponsors  

Meet Our Sponsors

SmarterTools
Verndale
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Multiple DBs with a custom DNN Membership Provider
Previous Previous
 
Next Next
New Post 10/5/2007 4:49 PM
User is offline Zambonilli
8 posts
10th Ranked


Multiple DBs with a custom DNN Membership Provider 

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 10:46 AM
User is offline Zambonilli
8 posts
10th Ranked


Re: Multiple DBs with a custom DNN Membership Provider 

anyone?

 
New Post 12/18/2007 2:02 PM
User is offline Zambonilli
8 posts
10th Ranked


Re: Multiple DBs with a custom DNN Membership Provider 

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 1:10 PM
User is offline Brian Begy
12 posts
www.chicagodatasolutions.com
10th Ranked


Re: Multiple DBs with a custom DNN Membership Provider 

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 6:45 AM
User is offline webmonkeymon
55 posts
www.solidvapor.com
10th Ranked


Re: Multiple DBs with a custom DNN Membership Provider 

 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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Multiple DBs with a custom DNN Membership Provider
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Software Development and Integration with DNN
HNP Solutions focuses on the pragmatic use of technology and process to meet an organization's business objectives. HNP Solutions employs seasoned Enterprise and Solution Architects, Delivery Managers and QA & Business Leads. Our capabilities range from project assessments & recommendations, design & code reviews, to full program implementations. We also work with organizations in need of senior staff augmentation purposes in the areas of Enterprise and Solution architecture.
www.hnpsolutions.com
Alki Homes - Seattle, WA
Exemplary service for your Seattle Real Estate needs. It's what you deserve from your Realtor®!
www.alkihomes.com
PointClick DotNetNuke Solutions
PointClick Technologies provides high-end DNN Hosting for businesses.
PointClick.Net Hosted Solutions

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP