•
•
•
•
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
![]() |
•
•
Join Date: Oct 2005
Posts: 17
Reputation:
Rep Power: 3
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: 79
Reputation:
Rep Power: 4
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)
•
•
•
•
•
•
•
•
DaniWeb ASP Marketplace
•
•
•
•
advertising ajax asp blog browser browsing community competition daniweb data design development dom domains firefox google hosting html india internet legal linux marketing microsoft mobile applications monetization mozilla multimedia news php privacy reader report research revenue rss search security software standards video vista w3c web web development webmaster wiki xml xoap yahoo
- Howz My Web Site, (Website Reviews)
- Random Web Site Redirects (Viruses, Spyware and other Nasties)
- Help on making a site(pages) like this (PHP)
- Transfer your Web site to WireNine.com Today! (Web Hosting Deals)
- Please review my Web site (Website Reviews)
- Why a web site, and why web hosting? (Web Developers' Lounge)
- Helpful Web Site (Windows NT / 2000 / XP / 2003)
- PC Mod Kingdom 3.5 (Geeks' Lounge)
Other Threads in the ASP Forum
- Previous Thread: Drop Down menu
- Next Thread: how do I upload a file into the database from dreamweaver?


Linear Mode