Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Emil Tinebo 19 posts 39 karma points
    Aug 16, 2010 @ 22:45
    Emil Tinebo
    0

    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?

  • Richard Soeteman 4045 posts 12898 karma points MVP 2x
    Aug 16, 2010 @ 22:51
    Richard Soeteman
    0

    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

  • Emil Tinebo 19 posts 39 karma points
    Aug 17, 2010 @ 08:51
    Emil Tinebo
    0

    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?

  • Emil Tinebo 19 posts 39 karma points
    Aug 17, 2010 @ 10:30
    Emil Tinebo
    0

    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?

  • Emil Tinebo 19 posts 39 karma points
    Aug 17, 2010 @ 20:49
    Emil Tinebo
    0

    OK, I have checked my code. Not more than 1 form tag anywhere.

    Any other suggestions?

  • Emil Tinebo 19 posts 39 karma points
    Aug 17, 2010 @ 21:21
    Emil Tinebo
    0

    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...

  • Emil Tinebo 19 posts 39 karma points
    Aug 17, 2010 @ 21:44
    Emil Tinebo
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft