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.0Programming Logon/Logoff Events in Custom Authentication ProviderProgramming Logon/Logoff Events in Custom Authentication Provider
Previous
 
Next
New Post
12/11/2007 3:33 PM
 

In my application, I need to perform additional work when the user logs on and logs off. I've taken the approach of creating a custom authentication provider by copying the DNN provider. I've also created a package installer to install/uninstall the provider. I am able to install my custom provider and login/logout of the application, so this part is working correctly.

For the login event, I've simply added my code to the cmdLogin_Click event handler in Login.ascx.vb. This part also works correctly.

For the logoff event, I need help: where do I program this? Looking at the OpenID and LiveID providers, I can see that they utilize a Logoff.ascx control. I added a Logoff.ascx control to my provider and updated the .dnn file accordingly (adding logoffControlSrc and file elements). The Logoff.ascx control gets installed into the site, but never seems to be utilized. Once logged in, I see the Logout link, but shouldn't my Logoff.ascx control be there instead?

What am I missing here? Is there a better way to customize the logon/logoff events?

TIA

 
New Post
4/1/2008 3:12 AM
 

I have the same issue.

Has nobody found a solution?

 

Thanks

 
New Post
4/1/2008 9:23 AM
 
In the AuthenticationController.vb ( part of DotnetNuke.Library) check the value for AuthenticationInfo.LogoffControlSrc it should point to your installed Logoff control Also when I changed the Membership provider I had added the Code for the Login, directly to the "UserLogin" Membership Method. To check what is happening at logoff put a breakpoint in the Page_load of your ~\admin\Authentication\Logoff.ascx.vb Best Regards Jutta Ipsen
 
New Post
4/22/2008 6:14 AM
 

Thanks, jipsen, your tips were very useful and I've resolved my troubles.

My custom login has to work exactly as DNN login does, I just have to add some cookies when the user logs in and clear them when the user logs off. So I copied the core login and add some code lines. But I forgot to change the line which adds to the http context the AuthenticationType, so it was DNN and when the user tried to logoff the site tried to use the core logoff procedure!

The line I mentioned is this:

Dim eventArgs As UserAuthenticatedEventArgs = New UserAuthenticatedEventArgs(objUser, txtUsername.Text, loginStatus, "DNN")

changed:

Dim eventArgs As UserAuthenticatedEventArgs = New UserAuthenticatedEventArgs(objUser, txtUsername.Text, loginStatus, "_mycustomlogintype_")

Hope this could help someone else.

 

Thank you

Federica

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Programming Logon/Logoff Events in Custom Authentication ProviderProgramming Logon/Logoff Events in Custom Authentication 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