I use Request.UserHostAddress, can only get IPv4 address, how to get IPv6 address of a visitor?
I use Request.UserHostAddress , can only get IPv4 address, how to get IPv6 address
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I assume you’re talking about
HttpRequest.UserHostAddress. It will always return the address that was used to connect to you. If the request was made over IPv6, it will return their IPv6 address; if the request was made over IPv4, it will return their IPv4 address.You should start by investigating why the request is being made over IPv4. And the folks at http://serverfault.com will probably be of more help on that.