Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I block a user from accessing a page?

Status
Not open for further replies.

MandoThrasher

Programmer
Jul 12, 2002
49
US
I need to block a particular user from accessing a page. I thought I could use Request.ServerVariables("REMOTE_USER") to detect his machine name and block him that way, since his IP address is dynamic and he's savvy enough to delete all his cookies. Request.ServerVariables("REMOTE_USER") is returning an empty value. How can I do this, other than password protecting the page?
 
I guess what I'm asking is how to identify this user when he accesses the site. Request.ServerVariables("REMOTE_USER") is not returning anything. Is there another way to uniquely identify a user other than setting a cookie?
 
Keep in mind that a computer's IP changes every it logs on to the internet unless it has been assigned a static IP.

Medic
 
There are two ways to do this, but unfortunately, both involve password protection.

1) Remove anonymous access from the site in IIS and assign all users who you want to have access to the site with user accounts to your network. (This way's kinda ugly and takes more administration than the next method)

2) Create a password protected page using ASP/Database backend.

There's no real way of locking this user out any other way (That I know of anyways). Even if he did have a static IP, he could always flip over to using a proxy server to get back to your site.

-----------------------------------------------
"The night sky over the planet Krikkit is the least interesting sight in the entire universe."
-Hitch Hiker's Guide To The Galaxy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top