C# Asp.net: problem with connecting all the links together

Code with C | Programming: Projects & Source Codes Forums ASP.NET C# Asp.net: problem with connecting all the links together

This topic contains 1 reply, has 1 voice, and was last updated by  SapnaVishwas 2 years, 7 months ago.

  • Author
    Posts
  • #10684

    CarltonBirch
    Member

    I’m working on my first asp webpage written in c# and asp.net, i’m having a problem with connecting all the links together. Basically what’s happening is all the pages are linked together, however navigating between them doesn’t always work.

    For example the first page is login if the user logs in it takes them to default, if the user presses register on the login page it should take them to the register page (instead it doesn’t, it changes the url to this http://localhost:4902/login.aspx?ReturnUrl=%2fRegistration.aspx and i cant get it to work from there.)

    if the user then logs in while the url is like that, it will take them to the registration page…

    If the user does log in and decides to log out the url changes again, this time to this (http://localhost:4902/login.aspx?ReturnUrl=%2fDefault.aspx) and i then can’t access the register page unless i log in..

    How do you go about fixing this?

  • #10685

    SapnaVishwas
    Member

    I assume that in your Web.config, you have added a <location> directive for which pages you want to “protect”.

    You must add Register.aspx as an exempt, or only require authentication for specific pages only.
    http://stackoverflow.com/questions/2540744/asp-net-disabling-authentication-for-a-single-aspx-page-custom-error-page

You must be logged in to reply to this topic.