Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Anyone seen this circumstance before?
membershiphelper.IsLoggedIn() returns true, by GetCurrentMemberId() returns -1?
Hi John
Did you try?
Request.IsAuthenticated
It works as expected for me.
There may be some cookie problems so I'd suggest clearing everything with the following:
TempData.Clear(); Session.Clear(); FormsAuthentication.SignOut();
And then trying it again.
You could use the Member Service as a workaround as well and get the user via username:
var username = Membership.GetUser().UserName; var member = memberService.GetByUsername(username);
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Detecting Member is Logged in
Anyone seen this circumstance before?
membershiphelper.IsLoggedIn() returns true, by GetCurrentMemberId() returns -1?
Hi John
Did you try?
It works as expected for me.
There may be some cookie problems so I'd suggest clearing everything with the following:
And then trying it again.
You could use the Member Service as a workaround as well and get the user via username:
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.