Copied to clipboard

Flag this post as spam?

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


  • Jan Molbech 31 posts 76 karma points
    Jan 18, 2012 @ 00:02
    Jan Molbech
    0

    problems navigating to next page

    I have created a start page called "Login" with a standard asp:login control. When i log in with the appropriate credentials i want i t to navigate to "home page"

    Above you can see the site structure. When i log in the page does not redirect correctly. the url looks correct but the page still contains the login control and does not contain the correct template. Any idea what I'm doing wrong?

  • Rodion Novoselov 694 posts 859 karma points
    Jan 18, 2012 @ 05:11
    Rodion Novoselov
    0

    Hi. Try to set the "defaultUrl" attribute of the "authentication/forms" element in your web.config file to the Url of your "Home page" (you can get it from the "Properties" tab).

  • Jan Molbech 31 posts 76 karma points
    Jan 18, 2012 @ 06:12
    Jan Molbech
    0

    Is this the part your talking about?

     

         

       

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jan 18, 2012 @ 06:36
    Jeroen Breuer
    0

    You can also set a property on the asp:login control. Think it's the DestinationPageUrl.

    Jeroen

  • Rodion Novoselov 694 posts 859 karma points
    Jan 18, 2012 @ 07:50
    Rodion Novoselov
    0

    Yes, from the structure you've presented I can guess that the configuration should look like:

    <forms loginUrl="/" defaultUrl="/home-page/"/>

    or

    <forms loginUrl="/" defaultUrl="/home-page.aspx"/>

    depending on the url style you're using.

  • Jan Molbech 31 posts 76 karma points
    Jan 18, 2012 @ 07:56
    Jan Molbech
    0

    No, that didn't fix the problem.

    Any other suggestions?

  • Rodion Novoselov 694 posts 859 karma points
    Jan 18, 2012 @ 08:11
    Rodion Novoselov
    0

    Could you tell how the full URL in the browser address bar looks when you come to the login page?

  • Jan Molbech 31 posts 76 karma points
    Jan 18, 2012 @ 08:15
    Jan Molbech
    0

    http://localhost:5253

    and when i have logged in it looks like this

    http://localhost:5253/home-page.aspx.

    I took Jeroen's advise and it worked.

    Thx.

  • Michael Latouche 504 posts 819 karma points MVP 3x c-trib
    Jan 18, 2012 @ 10:00
    Michael Latouche
    0

    Hi Jan,

    Can you then maybe mark Jeroen's post as the answer to your question? This will help others that would have the same issue. Thanks!

    Cheers,

    Michael.

     

  • Jan Molbech 31 posts 76 karma points
    Jan 18, 2012 @ 10:06
    Jan Molbech
    0

    I thought i already did that when i clicked the "high five"

  • Michael Latouche 504 posts 819 karma points MVP 3x c-trib
    Jan 18, 2012 @ 10:31
    Michael Latouche
    0

    :-) "High Five" is to give karma points to the author of any post you find interesting. Everybody can give "High Five" to anybody except himself, while the "mark as an answer" is only available to the post initiator to indicate which post actually solves the problem.

    Also, "High Five" only works (= give an extra karma point) if you have reached a certain karma yourself (I think 70 but I am not sure).

    Cheers,

    Michael.

Please Sign in or register to post replies

Write your reply to:

Draft