Tuesday, January 04, 2011

LoggedOut Event is not firing in the Login Control

Hi Folks,
Happy New Year 2011, This is my first post in this year. Hope everyone will have happy and promising year.
In this post i'm showing an issue i faced when i was working with the login control in ASP.NET.
Problem:
If you tried to write code to clean up some resources when you log out from your asp.net application and you had an issue that the LoggedOut event handler is not firing.
Resolution:
Check the properties of your login control and if the Logout Action property is not set to Refresh, You need to update this property and set it to Refresh then your loggedout event will be handled.
I had the logout action property to redirect and that's why the loggedout event handler wasn't called in my code.

Hope this helps.
Regards,
Mostafa Arafatwitter.com/mostafaelzoghbi

No comments: