User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 363,800 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,588 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 1855 | Replies: 2
Reply
Join Date: Oct 2005
Posts: 17
Reputation: JC_2000 is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
JC_2000 JC_2000 is offline Offline
Newbie Poster

Sessions/securing web site pages with a Login

  #1  
Apr 22nd, 2006
Hi everyone,

Can anyone tell me how you can stop users from URL Hacking your website with ASP (sessions)?
So for example if you have a password and username form on the front of your website and only want authorised members to gain access to your web site.

So for example just say you had a page e.g: somepage.htm and a user who was not logged in types www.somesite.com/somepage.htm. How can you stop them from getting access to the that page if they are not logged in?

P.S: Do you have any sample code?

Please help,

Jay.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2004
Location: Plymouth, UK
Posts: 79
Reputation: msaqib is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
msaqib msaqib is offline Offline
Junior Poster in Training

Re: Sessions/securing web site pages with a Login

  #2  
May 6th, 2006
<%
Dim lgn,pas ' Login name & Pasword
lgn=cstr(Request("login"))
pas=cstr(REquest("pass"))
if ((lgn="login") AND (pas="123")) then 
  session("admin") = True
  response.Redirect("somepage.asp")
end if
 
'now if the user have not logged in then 
if NOT(session("admin")) then Response.Redirect("NoAccess.asp")
%>

The simplest code will look like this.
Reply With Quote  
Join Date: May 2008
Posts: 1
Reputation: tparke is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
tparke tparke is offline Offline
Newbie Poster

Re: Sessions/securing web site pages with a Login

  #3  
May 9th, 2008
Hi Jay,

Did you manage to solve the URL hacking problem? I have the same situation and would really appreciate it if you could let me know how you got around it.

Thanks,
Tony
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ASP Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ASP Forum

All times are GMT -4. The time now is 11:14 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC