Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make sure a user can only vote once on an ASP.NET poll

I'm trying to make a ASP.NET (C#) poll that will ask a user a Yes/No question and log that vote to the database. To prevent spam I would like to be able to make sure users can only vote once. I've thought about logging the users IP address. If this is the answer can someone give me a tutorial that shows how this can be accomplished. If this is not the answer then give me your suggestions.

Edit: I'm not asking users to register as this is not my website.

like image 606
Kredns Avatar asked Feb 07 '09 01:02

Kredns


3 Answers

You can only garuantee that each user has one vote if you can authenticate the user. So you'll need an authentication mechanism, that will allow you to prevent the user from registering multiple accounts.

I can only see this work in an environment where the user has invested something into his account, like a subscriber for an online newspaper or a reputation system as on StackOverflow.

like image 115
Dave Van den Eynde Avatar answered Oct 01 '22 11:10

Dave Van den Eynde


You can't limit a single vote to one IP address. An IP Address does not equal a single user. An IP address represents one or more users.

like image 20
Shawn Miller Avatar answered Oct 01 '22 11:10

Shawn Miller


If you have a registered users list, send them an email containing a unique link which is generated containing a guid (for example), record the GUID in a database and match on voting.

If you are talking about generally publicly accessible and secure, then IP address on its own is not sufficient (google electronic electoral voting for the many issues involved with secure public voting).

Have you thought about using one of the free voting services?

Condorcet Internet Voting Service

like image 29
Mitch Wheat Avatar answered Oct 01 '22 11:10

Mitch Wheat