Re: Cookies

From: wl (sorry_at_nospam.nospam)
Date: 07/26/04


Date: Mon, 26 Jul 2004 11:59:56 +0200

On Microsoft MSDN pages you can vote for the usefulness of documents.
They also check whether you vote just once: I did some testing and it seems
they use a combination of IP and useragent name.

With the same IP and a different useragent you can still vote.... And also
with the same useragent and a different IP.

Wim

"Jos" <josnospambranders@fastmail.fm> wrote in message
news:ekdyTthcEHA.3988@tk2msftngp13.phx.gbl...
> Saber wrote:
> > I want to prevent users from voting more than 1 time in a simple poll.
> > I tried:
> >
> > Session.Timeout = 40
> >
> > Dim objCookie As HttpCookie
> > objCookie = New HttpCookie("before", "voted")
> >
> > If Session("before") = "" And Request.Cookies("before") Is Nothing
> > Then Session("before") = "voted: true"
> > Response.Cookies.Add(objCookie)
> > ...
> >
> > But the If block runs again when I close and open page, then
> > re-submit the form, I mean Request.Cookies("before") Is Nothing
> > always is Nothing!
> > why? what I've to do?
>
> You need to set an expiration time to the cookie to make it
> a persistent cookie.
> If you don't, the cookie will be a session cookie, and it
> will expire with the session.
>
> objCookie.Expires = Date.Now().AddDays(30)
>
> --
>
> Jos
>
>



Relevant Pages

  • Re: Cookies
    ... know what is cookie and how to delete. ... > will just clear there temporary internet files and will vote and vote and ... > this way you have everything server side and fraudulent use will be much ... >> If you don't, the cookie will be a session cookie, and it ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: E-mail Voting Security Q
    ... > voters affecting 10% to 15% of the vote. ... favour of us email voting with NO security in place. ... I am thinking the webpage voting with cookie should be adequate. ...
    (comp.security.misc)
  • Problem with cookies in poll script
    ... When the script checks that someone with that IP ... that you're only allowed one vote per month. ... cookie is there, it calculates a vote. ... that checks IP/month, and it keeps going through as if there is no cookie. ...
    (alt.php)
  • Re: E-mail Voting Security Q
    ... >> Personal identities of voters are unproven ... > A voting system must identify the voters, ... rather obvious fact that some people will vote swing. ... quickly have the same cookie on both machines... ...
    (comp.security.misc)
  • Re: Problem with cookies in poll script
    ... > that you're only allowed one vote per month. ... > cookie is there, it calculates a vote. ... the database on another machine than the webserver, then you will see how slow ... done this month+year, then don't check for the ip in hte database, as the user ...
    (alt.php)