How to create/validate a dotnetnuke user from a custom asp.net site?
Last Post 04/19/2011 7:14 AM by Joseph Craig. 1 Replies.
Author Messages
kaushal
Nuke Ace
Nuke Ace
Posts:42


--
04/19/2011 1:14 AM  
Hello Experts, I have a Dotnetnuke site and a custom asp.net site. DBs are different for both dnn and custom asp.net site What i need to do is whenever any user is created in the custom asp.net site I also need to create same user in DotNetNuke. So, what will be the best approach?

[1] should i take the dotnetnuke.dll reference in custom asp.net site to validate and create/update/delete the user?
[2] OR should i create a web service in a desktop module and create webmethods to achieve validate and create/update/delete functions and take the reference of that web service in my custom asp.net application. in this way, i dont need to take reference of dotnetnuke.dll in my custom asp.net site.

I may need to use other functionality of dnn in future as well in future thru that custom asp.net site.

Are above 2 alternatives valid? OR which should i prefer? Is there any other alternative to this?
Mocrosoft MVP [.NET/ASP.NET]
Joseph Craig
DNN MVP
Posts:11667


--
04/19/2011 7:14 AM  
The "best" approach would be to have the users resident in only one database and create something in the other application that knows about it.

If you want to keep the user information in your application, you could create "providers" for DotNetNuke. There are three providers that may be appropriate: Membership, Profile, and Roles. Most likely you do not need to replace the Roles provider, but you may need to replace the Membership and Profile provider.

I am assuming that users would only be created in the other application, so this would simplify things.

As the source code for DotNetNuke is available, you can easily get a jump on things with the existing providers. Switching providers is done in the web.config file (for example, like switching providers between the Telerik and FCK editors).

The "Professinal DOtNetNuke 4" book from Wrox has a pretty good discussion/description of the providers. I'm not sure what is in the "Professional DotNetNuke 5" book. That might be a good place to start.

Joe Craig, Patapsco Research Group
Complete DNN Support


---