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.0Using DNN authentication from third-party web-appUsing DNN authentication from third-party web-app
Previous
 
Next
New Post
3/28/2007 6:10 AM
 

Hi,

I need to use DNN authentication from a third party web-application. This means if someone registered on my DNN portal, he should be able to log in to my web-app with his username and password.

Since DNN uses ASPNET membership API, after copying membership and connection string sections to my web-app's web-config I can simply validate username and password with the code below using membership API:

 

 

Do you have any ideas?

Thanks a lot!

Örs

 

 

bool login = Membership.ValidateUser(username, passw);However this code gives back "true" for all users who is registered on any(!) of my portals, which is obviously not good for me. As far as I know  ASPNET membership API doesn't support multi-portal environment, so I need to find an alternative way how to do this.
 
New Post
3/28/2007 10:19 AM
 
I would think you'll want to run some SQL to check the user/portal table and see who belongs to what portals, and then approve or deny authentication based on what you find there.

Chris Hammond
Former DNN Corp Employee, MVP, Core Team Member, Trustee
Christoc.com Software Solutions DotNetNuke Module Development, Upgrades and consulting.
dnnCHAT.com a chat room for DotNetNuke discussions
 
New Post
3/30/2007 9:30 AM
 

Hi Chris,

Thanks for your answer, but going to database level is what I want to avoid if possible. So I checked what's happening when i log in to DNN, you can find code lines like this: (signin.aspx.vb):

objUser = UserController.ValidateUser(PortalId, txtUsername.Text, txtPassword.Text, "", PortalSettings.PortalName, ipAddress, loginStatus)

So there is some kind of API to log in using "portalid" as a parameter. I tried to reference dotnetnuke.dll in my project to call this method, but I didn't manage to write a runnable code. Can you help me in this? Is this a road that is possible to go down?

Thanks a lot!

Ors 

 

 

 
New Post
4/18/2007 7:04 PM
 

I have the exact same scenario and would lke to know as well. I've done everything I could think of to reference the UserController from within my app and have gotten a plethora of errors trying to do so. I realized i was in too deep when there were more DNN files in my app than anything else. The last error I got had to do with the Caching Provider (apparently getting user info is cached). I think for now I'm going to use the aspnet info to lookup the role data that I need since fortunately I only have one portal running. I would, however, like to do this the right way so if anyone knows an answer on the or has done it before I would really appreciate it.

 

Thanks,

Les

 
New Post
4/18/2007 9:55 PM
 

Also take a look at IWeb. When you install it there is a link to the IWeb client (a windows Forms program) With the client you can log into your DotNetNuke site. The source for everything is available (you can even use the free Visual Web Developer Express products to view and modify the code).

This should provide all the code you need to verify or log in a user.



Michael Washington
http://ADefWebserver.com
www.ADefHelpDesk.com
A Free Open Source DotNetNuke Help Desk Module
 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Using DNN authentication from third-party web-appUsing DNN authentication from third-party web-app


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