I have a website running Umbraco v
4.0.4.1 which was running fine until a few days ago. The problem is that logging in, using the umbracomembershipprovider, works but when i use Member.GetCurrentmember() it always returns null.
This website has been running for several years now and suddenly this problem came up.
Another funny things is that this issue only arises in the dev and staging environment, but not (luckily) in production environment. I have compared the web.configs but i see no differences between them.
I have checked the log table, but there is nothing of interest there.
I have had a problem with postback always being false which was caused because i had some controls that used a postbackurl. But no changes to the actual logging in or other membership related functions.
When i logging in i use the following code to check the credentials: Member m = Member.GetMemberFromLoginNameAndPassword(txtEmail.Text, txtPassword.Text); This works. So i have a member. Next i put the member in cache: Member.AddMemberToCache(m); With the memberID i fetch any shoppingdata stored in the database, works fine and consistent through the rest of the visit.
But the the funny thing is that in my navigation i show some links when a user is logged in a member cannot be found.
The following code always returns false: System.Web.HttpContext.Current.User.Identity.IsAuthenticated; and Member.GetCurrentMember alwyas returns null.
Have you got the correct access set in IIS? Go to your site in IIS, click Authentication. Have you got forms auth turned on? I am assuming the session is not being set when you login?
I wasnt able to reply sooner sorry. This all related to an issue caused by the usage of the PostbackURL property in a LinkButton control.
I have a languageswitch usercontrol in the website which has a LinkButton control in it. For some reason when you use PastbackURL IsPostback is always false.
Member.GetCurrentMember() is alyways null
Hello everyone,
I have a website running Umbraco v 4.0.4.1 which was running fine until a few days ago.
The problem is that logging in, using the umbracomembershipprovider, works but when i use Member.GetCurrentmember() it always returns null.
This website has been running for several years now and suddenly this problem came up.
Another funny things is that this issue only arises in the dev and staging environment, but not (luckily) in production environment. I have compared the web.configs but i see no differences between them.
Is there anyone who can help me with this issue?
Thanks in advance.
Hi Bunnynut
That's an odd issue - Has something changed in dev/staging? Server setup, server upgrades, MSSQL changes? Code changes interacting with the API?
Does the Log table reveal any usefull information from that date where things started acting weird?
/Jan
Hi Jan,
I have checked the log table, but there is nothing of interest there.
I have had a problem with postback always being false which was caused because i had some controls that used a postbackurl.
But no changes to the actual logging in or other membership related functions.
When i logging in i use the following code to check the credentials:
Member m = Member.GetMemberFromLoginNameAndPassword(txtEmail.Text, txtPassword.Text);
This works. So i have a member. Next i put the member in cache:
Member.AddMemberToCache(m);
With the memberID i fetch any shoppingdata stored in the database, works fine and consistent through the rest of the visit.
But the the funny thing is that in my navigation i show some links when a user is logged in a member cannot be found.
The following code always returns false: System.Web.HttpContext.Current.User.Identity.IsAuthenticated;
and Member.GetCurrentMember alwyas returns null.
Have you got the correct access set in IIS? Go to your site in IIS, click Authentication. Have you got forms auth turned on? I am assuming the session is not being set when you login?
Have you looked at the request in fiddler?
Charlie
I wasnt able to reply sooner sorry. This all related to an issue caused by the usage of the PostbackURL property in a LinkButton control.
I have a languageswitch usercontrol in the website which has a LinkButton control in it. For some reason when you use PastbackURL IsPostback is always false.
I get a lot of these weird errors lately.
is working on a reply...