I have a problem with the IsLoggedOn extension method in umbraco.library.
In certain circumstances (namely the first visit to the site after restarting the browser) the Isloggedon method will return true however the ASP LoginName control will not return the login name. A browser refresh will fix the issue and subsequent requests will show the correct LoginName value. The issue is not immeditaly repeatable - i.e. if I close the browser and re-open it the issue will not occur. Instead I have to leave the browser for a a number of minutes (seems to be associated with member / session timeout.
We are using Umbraco 4.7
A suitable workarund would be to expire the login after teh browser closes, however I have tried using FormsAuthentication.RedirectFromLoginPage(Login1.UserName, false); in my login.Authenticate method to prevent a persistent cookie from being created, however the cookies are still created and the issue above will therafter occur. A fix to either issue will be suitable - any ideas?
After further inspection the issue seems to be when the "yourAuthCookie" has expired but the UMB_MEMBER cookie has not. The value in the yourAuthCookie seems to represent the value set in the formsauthentication timeout property.
This sounds like a recent bug that was introduced in 4.7 and is fixed for 4.7.1 (not yet released). See this workitem in codeplex: http://umbraco.codeplex.com/workitem/30171
There is a workaround posted there, to run the following code for logging out:
int memberID = Member.CurrentMemberId(); Member.ClearMemberFromClient(memberID);
LoginName control and IsLoggedOn issues
I have a problem with the IsLoggedOn extension method in umbraco.library.
In certain circumstances (namely the first visit to the site after restarting the browser) the Isloggedon method will return true however the ASP LoginName control will not return the login name. A browser refresh will fix the issue and subsequent requests will show the correct LoginName value. The issue is not immeditaly repeatable - i.e. if I close the browser and re-open it the issue will not occur. Instead I have to leave the browser for a a number of minutes (seems to be associated with member / session timeout.
We are using Umbraco 4.7
A suitable workarund would be to expire the login after teh browser closes, however I have tried using FormsAuthentication.RedirectFromLoginPage(Login1.UserName, false); in my login.Authenticate method to prevent a persistent cookie from being created, however the cookies are still created and the issue above will therafter occur. A fix to either issue will be suitable - any ideas?
After further inspection the issue seems to be when the "yourAuthCookie" has expired but the UMB_MEMBER cookie has not. The value in the yourAuthCookie seems to represent the value set in the formsauthentication timeout property.
Is there a workaround to this?
Hi,
This sounds like a recent bug that was introduced in 4.7 and is fixed for 4.7.1 (not yet released). See this workitem in codeplex: http://umbraco.codeplex.com/workitem/30171
There is a workaround posted there, to run the following code for logging out:
or you could try using the latest nightly build from http://nightly.umbraco.org
Hope this helps,
Tom
is working on a reply...