Login Control not working when logging in from first page
Hi,
I've ran across a really strange problem. In my master template I have a .net user control for handling the membership login/logout procedure. It has been working fine up to just now.
I have noidea what happend but I am unable to login if I am om the Home page (which is the very first page the user reach when he visits the website).
If I enter the username and the password, the page simply posts back without logging me in.
Since the login control is visible on all pages (it is located in the page header) I tried navigating to a different page and here I am able to login. I can then go back to the home page and use the controls there.
Please Check if you have mulitple form elements on your homepage. It could be that you have and that explains the reload of the page without logging in.
I did a quick check yesterday evening right before posting this message and I could not find any multiple form elements. I will have a more thorough look tonight.
I did some debugging. I implemented the OnAuthenticate and OnLoggedIn methods in my Login User Control just to be able to debug.
I place a breakpoint inside the OnAuthenticate method and guess what... it's never reached. It appears that the OnAuthenticate method is not run when trying to login from the homepage. As I said before the control works perfectly fine whe I login from any other page.
One work around could be to link the user to a separate login page from the header instead of placing the login control in the site header... but that's not how I want the design...
OK I finally found out what was causing the problem. But I'm not sure how to solve it.
On my home page I have a couple of things and a .net macro containing an Ajax Update Panel is one of them. This seem to be causing the problem. If I removed this macro the login control began working again. So it seems that a login control and an Ajax UpdatePanel cannot exist on the same page simultaneously... is there some properties to set to help overcome this problem or do I have to face the facts that I need to create my own custom login control?
Login Control not working when logging in from first page
Hi,
I've ran across a really strange problem. In my master template I have a .net user control for handling the membership login/logout procedure. It has been working fine up to just now.
I have noidea what happend but I am unable to login if I am om the Home page (which is the very first page the user reach when he visits the website).
If I enter the username and the password, the page simply posts back without logging me in.
Since the login control is visible on all pages (it is located in the page header) I tried navigating to a different page and here I am able to login. I can then go back to the home page and use the controls there.
What's going on here? Any suggestions?
Please Check if you have mulitple form elements on your homepage. It could be that you have and that explains the reload of the page without logging in.
Cheers,
Richard
I did a quick check yesterday evening right before posting this message and I could not find any multiple form elements. I will have a more thorough look tonight.
Could something else be causing this issue?
The main difference between the homepage and any other page on my site is that the home page is really javascript heavy.
I'm relying heavily on jQuery and some jQuery-plugins. It also has an Ajax Update Panel. Can any of those cause the login control to stop working?
OK, I have checked my code. Not more than 1 form tag anywhere.
Any other suggestions?
I did some debugging. I implemented the OnAuthenticate and OnLoggedIn methods in my Login User Control just to be able to debug.
I place a breakpoint inside the OnAuthenticate method and guess what... it's never reached. It appears that the OnAuthenticate method is not run when trying to login from the homepage.
As I said before the control works perfectly fine whe I login from any other page.
One work around could be to link the user to a separate login page from the header instead of placing the login control in the site header... but that's not how I want the design...
OK I finally found out what was causing the problem. But I'm not sure how to solve it.
On my home page I have a couple of things and a .net macro containing an Ajax Update Panel is one of them. This seem to be causing the problem.
If I removed this macro the login control began working again. So it seems that a login control and an Ajax UpdatePanel cannot exist on the same page simultaneously... is there some properties to set to help overcome this problem or do I have to face the facts that I need to create my own custom login control?
I'd appreciate any input on the matter.
Thanks alot!
is working on a reply...