问题
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