G
Guest
I'm having trouble testing an ASP.net app on IIS7. In my application I'm
testing the IP address of the host and acting on it. This test fails on Vista
because the system is returning an invalid IP address for localhost. All 3 of
the following commands return ::1 rather then 127.0.0.1
Ping localhost
HttpContext.Current.Request.UserHostAddress
HttpContext.Current.Request.ServerVariables("REMOTE_ADDR")
I've turned off ipv6 thinking this might have been the trouble but it still
returns the same data. I can ping 127.0.0.1 and that works but by name
localhost and via the ASP.net request object is invalid.
testing the IP address of the host and acting on it. This test fails on Vista
because the system is returning an invalid IP address for localhost. All 3 of
the following commands return ::1 rather then 127.0.0.1
Ping localhost
HttpContext.Current.Request.UserHostAddress
HttpContext.Current.Request.ServerVariables("REMOTE_ADDR")
I've turned off ipv6 thinking this might have been the trouble but it still
returns the same data. I can ping 127.0.0.1 and that works but by name
localhost and via the ASP.net request object is invalid.