aspnet_Membership IP address

允我心安 提交于 2019-12-12 01:35:43

问题


Is it a way to add "IP Address" field in aspnet_Users, and then control it when user try to login?


回答1:


There is a Comment property on the MembershipUser object. You can do it to do whatever you want (it is a string).

http://msdn.microsoft.com/en-us/library/system.web.security.membershipuser.comment.aspx




回答2:


I have not heard of anyone doing this. Probably with good reason because it doesn't sound like a good idea for a web application.

Consider, many web clients have dynamically allocated IP addresses from their ISP and so their IP address changes all the time, also, if multiple clients are using the one proxy, then you will have non-unique records for IP address.

If you want to employ IPsec then consider using the server firewall or IIS rather than a membership provider.



来源:https://stackoverflow.com/questions/4898022/aspnet-membership-ip-address

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!