Posted by okutbay on 15.09.2009 19:24 | Yorumlar (0)

Today we've faced a weird problem.

While we are debugging noticed that we can not get the IP adress of the requester.

 

    1 string userHostAddress = HttpContext.Current.Request.UserHostAddress;

This code returns  "::1" instead of "127.0.0.1".

After a little search this is about the Vista's hosts file problem. And this is only a development issue for Vista systems.

Open your hosts file ( %WinDir%\System32\drivers\etc\hosts ) see the entry "::1    localhost".  Feel free to remove line or comment the line with #.

 

Happy codding...

 

 

Bu yazıyı ilk değerlendiren siz olun

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Yorumlar

Yorum ekle


(Gravatar simgesini gösterecek)  

  Country flag

biuquote
  • Yorum
  • Canlı önizleme
Loading