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.0Custom Membership ProviderCustom Membership Provider
Previous
 
Next
New Post
1/17/2007 3:26 PM
 

I'm having trouble wrapping my brain around the DNN membership provider and how to replace it with a custom membership provider. I sure hope someone out there can help me.

We have an ASP.NET 2.0 application with its own very simple membership provider, storing user info in a SQL database, and we would like to build DNN sites that authenticates against the other application's users. We don't want to replicate data and/or manage user data in multiple data stores. We just want these DNN sites to use the custom application's users.

So, first of all, is this actually possible? I've read in some places that even with a custom membership provider, the user data has to be replicated in the DNN database.

Second, how can I do this? Do I need to replace the AspNetMembershipProvider or the DNNMembershipProvider? Or both? What about roles? Or maybe I don't even have to mess with the membership provider if I just use a custom authentication provider. Would that work?

Any help whatsoever would be greatly appreciated. Thanks!

Tim


--
Tim Rolands
Avastone Technologies | House of Nuke
Where DotNetNuke(R) Lives
 
New Post
1/17/2007 4:53 PM
 
You may want to look at a pre DNN 3.3/4.3 version. Sharing users was much easier in DNN 4.0. Supposedly it’s possible to write a custom Membership/Profile provider for DNN 3.3/4.3. You should view any replacements of the default providers as a modification to the DNN core. The only exception to this is if the data stored in the DotNetNuke database is completely unaltered by the custom provider you implement. For example, if you had a provider that sent an email whenever someone registered that would be fine.

It has been my experience that any customization to the DNN user infrastructure leaves your application vulnerable to future DotNetNuke updates. I’d recommend using a solution based on replication. It’s the only way to guarantee that your user base will survive a future DNN update. If you go the replication route…

During login…
- Create the DNN user and add it to the portal if it doesn’t already exist.
- Synchronize any profile properties
- Add the default DNN roles and optionally synchronize the DNN roles with your external APP

One more thing, I wouldn’t rely on the ASP.Net Membership Provider being around in future versions of DNN. If you look at how DNN uses the membership provider, they’d have nothing to lose if they moved the password into the Users table and removed the provider. I haven’t heard any plans to do this, however the code leaves this open as an option.

Brian

Qualtiy DotNetNuke modules and custom development; we've been serving the DNN community for over 2 years and have hundreds of satisfied customers. Let us serve you today.
 
New Post
1/17/2007 5:52 PM
 

Thanks, Brian.

Unfortunately, the no-replication requirement is not something I can change. And I'm trying to do this in DNN 4.4, BTW. We really want to take advantage of the latest version for this project, because we want the reliability and performance improvements.

I have been able to use Henry Kenaum's article on the Engage Software website to replace the AspNetMembershipProvider with a custom one that really does exactly the same thing. But when I try to hook it up to the other database, I get problems. Still need to work through those, but one thing I can already see is that it still looks at the DNN db for authentication.


--
Tim Rolands
Avastone Technologies | House of Nuke
Where DotNetNuke(R) Lives
 
New Post
1/17/2007 5:57 PM
 
The users will have to be in the UserPortals table and they'll need the correct roles assigned in DNN. Also, DNN uses the information in the Users table. The ASP.Net MembershipProvider is used for authentication and password managment but that's about all.

Qualtiy DotNetNuke modules and custom development; we've been serving the DNN community for over 2 years and have hundreds of satisfied customers. Let us serve you today.
 
New Post
1/17/2007 10:37 PM
 
timrolands wrote

Thanks, Brian.

Unfortunately, the no-replication requirement is not something I can change. And I'm trying to do this in DNN 4.4, BTW. We really want to take advantage of the latest version for this project, because we want the reliability and performance improvements.

I have been able to use Henry Kenaum's article on the Engage Software website to replace the AspNetMembershipProvider with a custom one that really does exactly the same thing. But when I try to hook it up to the other database, I get problems. Still need to work through those, but one thing I can already see is that it still looks at the DNN db for authentication.

If you want to replace the Membership Provider, Roles Provider, and Profile Provider (a huge pain in the ass) you will be able to get away with not duplicating data in tables, however it would make a lot more sense for you to create a membership provider that maintains both the DotNetNuke architecture, and your own architecture.

You can use the ASP.NET provider as a perfect example, because that is exactly what that provider does - integrates with the ASP.NET Membership provider while also updating the DNN tables.

Be aware that you will both have to create the providers and also replace the HTML modules... don't forget about the HTML Modules like I did and wonder what's not working :)

Having done all this: Your work will become a lot easier if you can be assured that the DisplayName and Username will never change.

As far as simplicity: Replacing the model is no easy task: Expect to spend about 80 developer hours if you're an expert .NET developer with moderate DNN experience; or ~100 hours if you have no DNN experience or experience working with provider models and HTML Modules.This project is by no means a project that someone who is newer to .NET should attempt to tackle; 

Part of this time will be affected by questions like: Will you allow users to change passwords in DNN?  If the answer is yes - you need to make sure to fill in all of these methods...   If the answer is no, you're going to be making some custom login forms and a custom manageusers.aspx to accomidate the 'broken' stubs - unless it is okay to release a product where you tell your users "Don't do this - that will break things..."; but this is rarely the wise move.

If done right - you can be sure that most core DNN upgrades will not cause problems; I haven't seen anything in the roadmap that would cause the membership module signatures to have to change and break compatability.

Having done work like this before, if you are interested in hiring out the project; I do have some open time coming up :) mattchristenson@realskydiving.com

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Custom Membership ProviderCustom 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