Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Prevent the URL access.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
muthu - 30 Jul 2007 08:41 GMT
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
Jesse Houwing - 30 Jul 2007 10:56 GMT
* muthu wrote, On 30-7-2007 9:41:
> Hi,
> I have a homepage.aspx and lot of other pages also.Some pages are pop
[quoted text clipped - 5 lines]
> 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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.