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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

deny web-access based on cookie

Status
Not open for further replies.

boein

Technical User
Jul 17, 2003
84
BE
Is it possible to deny a computer to access a website by checking the existance of a certain cookie on that computer. If a pc has the cookie installed he can acces if not...no access to the web site. If possible can sb post the ASP code for creating this cookie an the ASP code to check for the created cookie?

Thanks
Wim
 
This should get you started:
To create the cookie:
response.Cookies("myCookie")("Allow")="No"

To read the cookie and redirect:
If request.Cookies("myCookie")("Allow")="No" Then
response.redirect("End If
 
It doesn't work. I already visited that web-site w3schools but it doesn't help me either. Can you please explain me a little bit more?

Thanks
Wim
 
do you have except cookies ticked in your browser?

___________________________________________________________________

The answer to your ??'s may be closer then you think. faq333-3811
Join the Northern Illinois/Southern Wisconsin members in Forum1064
 
One question though...

If a user is only allowed to see the page if the cookie is present... and it is the page that sets the cookie... how will anyone ever see the page?

What I mean is that no one will have the cookie to begin with. How will they get the cookie to view the page?

Just a thought.

Wow JT that almost looked like you knew what you were doing!
 
Indeed,
the user has no cookie, we will import the cookie on his machine. In this way we can more or less control which machine can access the website and which machine cannot.
We want to use this web-site to allow people to logon to our citrix farm via webinterface (nfuse), but only people who uses our hardware. To make sure they alway use the latest patches and virus dat-files. When we allow everybody to access there is a certain risk the user logs on with an infected pc.
I thought working with cookies would made it more difficult for a user to gain access to our website with his home-computer instead of his company portable.

There must be a way to accomplish this, or am I wrong?

Regards
Wim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top