Prevent the URL access.

Discussion in 'ASP .Net' started by muthu, Jul 30, 2007.

  1. muthu

    muthu Guest

    Hi,
    I have a homepage.aspx and lot of other pages also.Some pages are pop
    up pages which will get input from the user. now what happens is some
    users try to enter the URL of the popups directly to the browser
    window and tries to enter values.As he is logged in before, He able to
    access the pages like that. what I want is to prevent all the pages
    except the home page. if the user enters other urls it should simply
    forward them to homw page.
    Please help me
     
    muthu, Jul 30, 2007
    #1
    1. Advertising

  2. * muthu wrote, On 30-7-2007 9:41:
    > Hi,
    > I have a homepage.aspx and lot of other pages also.Some pages are pop
    > up pages which will get input from the user. now what happens is some
    > users try to enter the URL of the popups directly to the browser
    > window and tries to enter values.As he is logged in before, He able to
    > access the pages like that. what I want is to prevent all the pages
    > except the home page. if the user enters other urls it should simply
    > forward them to homw page.
    > Please help me


    There are a couple of things you can do:
    1) Check if the correct parameters are passed to the page, if they are,
    allow the user through. You can check these parameters in the
    Page.OnInit method and either Response.Redirect/Server transfer the user
    back to the homepage.

    2) Check the Referrer of the page from the server variables. You can
    check this variable in the Page.OnInit and either
    Response.Redirect/Server transfer the user back to the homepage.

    3) In javascript on the page, check if the Opener variable is set (in
    that case it's a pop-up window). If its not, use Location.Replace(new
    url) to send the user back to the homepage.

    This isn't something you can easily configure if that was what you were
    looking for.

    Jesse
     
    Jesse Houwing, Jul 30, 2007
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. swbaz
    Replies:
    2
    Views:
    648
    Jordan Marton
    Aug 13, 2003
  2. =?Utf-8?B?Um9i?=
    Replies:
    3
    Views:
    14,626
    Steven Cheng[MSFT]
    Jan 21, 2004
  3. Jon paugh
    Replies:
    1
    Views:
    881
  4. Itai
    Replies:
    0
    Views:
    561
  5. Just D.
    Replies:
    0
    Views:
    509
    Just D.
    Aug 11, 2004
Loading...

Share This Page