473,396 Members | 1,998 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

how to allow to vote only once by controlling client IP in my poll website with c#?

Hello i am creating a poll website to vote for some projects but i want to prevent voting more than only one time and i want to control it by client IP .. do you have any idea?? thnks , regards !!
May 24 '13 #1

✓ answered by pod

If your website is behind a proxy server, the request.servervariables("REMOTE_HOST") might always return its IP (proxy server), in this case, check this link:
http://stackoverflow.com/questions/6...-the-server-ip

For future reference, here is a list of the ASP ServerVariables Collection:
http://www.w3schools.com/asp/coll_servervariables.asp

10 2540
pod
298 100+
If you can capture the client IP as they click to vote, then in your code logic follow these steps:
  1. check the data table for the client IP
  2. if it exists return a message that they already voted
  3. else insert the client IP into the data table and return an acknowledgement message
May 24 '13 #2
THanks for the answer , can you tell me how to track the client ip?
May 24 '13 #3
pod
298 100+
With server variables; in your case request.servervariables("REMOTE_ADDR")
May 24 '13 #4
remote_adrr is my domain?!! and this variable i am gonna save to my db??
May 24 '13 #5
pod
298 100+
If your website is behind a proxy server, the request.servervariables("REMOTE_HOST") might always return its IP (proxy server), in this case, check this link:
http://stackoverflow.com/questions/6...-the-server-ip

For future reference, here is a list of the ASP ServerVariables Collection:
http://www.w3schools.com/asp/coll_servervariables.asp
May 24 '13 #6
pod
298 100+
remote_adrr is the IP of the machine requesting a page from a web server
May 24 '13 #7
thanks to much :) ,, regards!!
May 24 '13 #8
vijay6
158 100+
If you can capture the client IP as they click to vote, then in your code logic follow these steps:

1. check the data table for the client IP
2. if it exists return a message that they already voted
3. else insert the client IP into the data table and return an acknowledgement message
Hey pod, i've some doubts!!! What will happen if the ISP of the client allocates dynamic IP for the client whenever client connects to the internet?

With server variables; in your case request.servervariables("REMOTE_ADDR")
Is this right?
May 27 '13 #9
pod
298 100+
"What will happen if the ISP of the client allocates dynamic IP for the client whenever client connects to the internet?"
You are right vijay6 it is a good concern but one would have to turn off and on their modem and hope to get a different IP just to vote again. My ISP allocates dynamic IP addresses as well, and I do not know if it is the same for most ISP but in over 10 years I think my IP address changed three or four times...but then again my modem is always on.


So you brought a valid point, and there are other methods to consider:

One could to try to capture the MAC Address of the user, but that can be falsified as well.
Cookies is another way, but cookies can be deleted.
Getting voters to register and login before voting, but again one can register multiple times.

There is a lot to consider but for the sake of simplicity I think this is good enough for the purpose of a poll (unless of course you are electing a new president :)


There is probably a better way to do this that someone knows out there but that was my two cents

P:oD

p.s.
cool name "vijay6", you should get a proper avatar
May 27 '13 #10
vijay6
158 100+
Hey pod, whatever method we use we can't stop fraud vote for this scenario but we can reduce it. By capturing few more informations. Like what you said by capturing IP address, Mac address and Login & Vote, we can reduce it.

you should get a proper avatar
Why don't you suggest a proper avatar for me?
May 28 '13 #11

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Doug Holton | last post by:
George W Bush, as certified by Florida's election commission. Which decorator syntax do you like the most? See http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll A. @classmethod def...
9
by: Lad | last post by:
Is there a poll script available in Python?
0
by: adam roth | last post by:
Hello, We're looking for a client-side (ActiveX) control to allow web users to resize, rotate, and manipulate images on our server without requiring a server post-back for each. Once the image...
3
by: Beatrice | last post by:
I am stuck with this problem and desperately need your help. I would like to upload an xml file or any file from client machine and then save it to the server machine. Since the file path on the...
3
by: KathyMarriage | last post by:
Hello In days gone by I was a VB programmer but currently tasked to find some answers for a ASP guy. Basically I am wanting to incorporate some of the functionality of the Common Dialog...
0
by: Bill Nguyen | last post by:
I'm sending email (a Crystal report attachment) using Outlook from a VB.NET application. Is there a way to programmatically disable to dialog box asking for permission to access Outlook features so...
1
by: Rodney | last post by:
I want to notify browser of every time my server side event fires w/o creating some sort of timer on client. Basically, can server notify client w/o client initiating contact? Again, thx for any...
3
by: Paul H | last post by:
As I take on more complex database work, the main problem seems to be getting the specification from the client. I have created some simple spread sheets that allow the client to enter field...
9
by: Ethan Strauss | last post by:
Hi, I have a web service which is doing a lot of processing and taking 4-5 minutes to do so. The processing is split into several discrete steps and I would like for the service to be able to tell...
1
by: vote4amin | last post by:
Dear frens, Need your help to spend a minute of your time to vote for my little boy in Cutefam 2008 contest. Please click --->>> http://www.thelilcaliph.com/CuteFam2008/voteWithCodes.html to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.