Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们必须在 asp.net 和 c# 中构建一个功能,在在线调查中,一个 IP 地址只能参加一次调查?我们怎样才能做到这一点?
试试这个来获取IP
HttpContext.Current.Request.UserHostAddress; or HttpContext.Current.Request.ServerVariables["REMOTE_ADDR"]; or HttpContext.Current.Request.ServerVariables["HTTP_X_FORWARDED_FOR"];
在数据库中存储一些位置..现在每次请求调查时,您都可以在数据库中查找它是否存在