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  |  

DotNetNuke Marketplace
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Indoo
 


  Sponsors  

Meet Our Sponsors

eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
 


DotNetNuke Forums
 
  Forum  General DotNetN...  Extend It! ( Pr...  Programming Logon/Logoff Events in Custom Authentication Provider
Previous Previous
 
Next Next
New Post 12/11/2007 11:33 AM
Unresolved
User is offline CBoland
6 posts
10th Ranked


Programming Logon/Logoff Events in Custom Authentication Provider 

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 12:12 AM
User is offline Federica
2 posts
10th Ranked


Re: Programming Logon/Logoff Events in Custom Authentication Provider 

I have the same issue.

Has nobody found a solution?

 

Thanks

 
New Post 4/1/2008 6:23 AM
User is offline jipsen
18 posts
10th Ranked


Re: Programming Logon/Logoff Events in Custom Authentication Provider 
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 3:14 AM
User is offline Federica
2 posts
10th Ranked


Re: Programming Logon/Logoff Events in Custom Authentication Provider 

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 Previous
 
Next Next
  Forum  General DotNetN...  Extend It! ( Pr...  Programming Logon/Logoff Events in Custom Authentication 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.

 


DotNetNuke Marketplace - Modules & Skins
The DotNetNuke Marketplace is the official e-commerce gateway for the DNN ecosystem. It's the place to buy and sell DotNetNuke modules, DotNetNuke skins, and other DNN offerings.
DotNetNuke Marketplace
ExactTarget Email Marketing Software and Solutions
ExactTarget delivers on-demand email software solutions for permission-based email marketing. ExactTarget offers solutions that meet the needs of all industry verticals and all size organizations, including SMB, corporate divisions, not-for-profits, large retail/direct marketers, agencies and enterprises.
ExactTarget.com
Sunset Hill Solutions - Consulting and Development
We offer general DNN consulting services - including custom module development and commercial module integration/setup.
www.sunsethill.ca

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