As specified above, i want to write the current user name into a file while logging out.
i simply coudn't catch the log out event
i added OnLoggedOut="LoginStatus1_LoggedOut" to catch it but didn't work :(
i couldn't even write anything as if it was not even thrown !
<EPiServer:Property ID="Property3" PropertyName="SecondaryBody" runat="server" />
<asp:literal ID="Literal1" runat="server" Text="<%$ Resources: EPiServer, login.currentuser %>" /> <asp:LoginName ID="LoginName1" runat="server" />.
<asp:LoginStatus ID="LoginStatus1" OnLoggedOut="LoginStatus1_LoggedOut"
LogoutText="<%$ Resources: EPiServer, login.logout %>" runat="server" />
protected void LoginStatus1_LoggedOut(object sender, EventArgs e)
Utilities.LogToFile("[Default_ LoginStatus1_LoggedOut _] ");// ... //FormsAuthentication.SignOut();
Any idea to fix it?
Hi again .. So what about just writing "Good Bye" when any user logout?
Can Anyone answers me then !
My main problem is that i can't catch the logout event !
otherwise why it wouldn't call the LoginStatus1_LoggedOut method ?
I tried your code (except the write to file part) and for me it worked, the event fired. are you sure that you don`t do any databind or other things that can mess things up in some other part for example the master page?
Try the code on an empty page where nothing can interfere and work your way from there.
best of luck!
I would try to do it on the LoggingOut-event instead. If you allready are logged out, I guess it will be pretty hard to get the username from the logged out person. And if you are at a "restricted" page when logging out, will you ever reach the LoggedOut-event?
Yes as you sayed, LoggingOut event is more convignient.. it's just to see if it was triggered or not !
thanks anyway !
@ Mikael Jönsson
Well i am newbie about handling/dealing with Master pages .. so if there any thing that i should verify in it, just tell !
i tested the same code using google chrome and it worked just fine .. but not with Firefox
i do not know why ?! Do you have any idea?