Please support our ASP advertiser: Lunarpages ASP Web Hosting
Views: 2052 | Replies: 2
![]() |
•
•
Join Date: Oct 2005
Posts: 17
Reputation:
Rep Power: 4
Solved Threads: 0
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.
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.
•
•
Join Date: Sep 2004
Location: Plymouth, UK
Posts: 83
Reputation:
Rep Power: 5
Solved Threads: 1
<%
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.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)





Linear Mode