i want to get the client IP address who makes the request to my site. here is some code to get this:
var w2 = HttpContext.Request.UserHostAddress;
var w3 = this.Request.UserHostAddress;
this works fine when the request comes from browser. but when the request comes from javascript i don't get the results excpected.
here is my javascript requset:
<script src="http://localhost:55866/Dashboard/GetCampine?MediaId=21&ProductsTypId=5 ">
</script>
that is what i get: w3=::1 w2=::1