user1673394
user1673394

Reputation: 617

One IP address to be allowed only once in asp.net

we have to build a functionality in asp.net and c# which in a online survey one ip address will only be allowed to attend the survey once? how can we achieve this?

Upvotes: 0

Views: 435

Answers (1)

sangram parmar
sangram parmar

Reputation: 8736

Try this to get IP

HttpContext.Current.Request.UserHostAddress; 
or 
HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"];
or
HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];

Store some where in database..now for every time on Request for survey you can lookup in database that it is exist or not

Upvotes: 1

Related Questions