Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Prevent the URL access.

Reply
Thread Tools

Prevent the URL access.

 
 
muthu
Guest
Posts: n/a
 
      07-30-2007
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

 
Reply With Quote
 
 
 
 
Jesse Houwing
Guest
Posts: n/a
 
      07-30-2007
* 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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
URL - substitution of a correct URL by a GUID like URL in favorites. Just D. ASP .Net Mobile 0 08-11-2004 04:26 PM
How does smartNavigation prevent Postback URL's from being added to the browser History? Itai ASP .Net 0 08-10-2004 04:29 AM
redirect URL's, return URL's, and URL Parameters Jon paugh ASP .Net 1 07-10-2004 05:29 AM
How to prevent Postback URL's from being added to browser history =?Utf-8?B?Um9i?= ASP .Net 3 01-21-2004 07:33 AM
How do I prevent users from viewing a webpage directly by typing in its URL? swbaz ASP .Net 2 08-13-2003 01:23 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57