| | |
Sessions/securing web site pages with a Login
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Oct 2005
Posts: 17
Reputation:
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
Posts: 89
Reputation:
Solved Threads: 1
ASP Syntax (Toggle Plain Text)
<% 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.
![]() |
Similar Threads
- 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? (IT Professionals' Lounge)
- Helpful Web Site (Windows NT / 2000 / XP)
- 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?
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection diagnostics dreamweaver excel fso iis microsoft msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption server single specfic sqlserver sqlserverconnection toolkit webserver windows7





