A Windows Vista forum. Vista Banter

Welcome to Vista Banter.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to ask questions and reply to others posts, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Go Back   Home » Vista Banter forum » Microsoft Windows Vista » Networking with Windows Vista
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Networking with Windows Vista Networking issues and questions with Windows Vista. (microsoft.public.windows.vista.networking_sharing)

Ping Localhost Returns Invalid IP



 
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old October 2nd 06, 04:52 PM posted to microsoft.public.windows.vista.networking_sharing
Leightynet
external usenet poster
 
Posts: 5
Default Ping Localhost Returns Invalid IP

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("REMOT E_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.
  #2 (permalink)  
Old October 4th 06, 02:50 AM posted to microsoft.public.windows.vista.networking_sharing
RobertLane
external usenet poster
 
Posts: 20
Default Ping Localhost Returns Invalid IP

I think this may be because the LMHOST.SAM file that installs with Vista does
not have the last entry "remarked out" and thus it actually loads the 127
address for localhost.

"Leightynet" wrote:

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("REMOT E_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.

  #3 (permalink)  
Old October 4th 06, 04:36 AM posted to microsoft.public.windows.vista.networking_sharing
Leightynet
external usenet poster
 
Posts: 5
Default Ping Localhost Returns Invalid IP

Actually I found the problem. It was actually in the hosts file rather then
lmhost.sam. There was a double entry in it for 127.0.0.1.
127.0.0.1 localhost
::1 localhost

This was in a clean file from a clean install. I am reasonably sure it was
there from the time I loaded RC1. Since I'm evaluating the basic environment,
I have not loaded anything other than MS apps - Office 2007 and VS2005

Michael

"RobertLane" wrote:

I think this may be because the LMHOST.SAM file that installs with Vista does
not have the last entry "remarked out" and thus it actually loads the 127
address for localhost.

"Leightynet" wrote:

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("REMOT E_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.

  #4 (permalink)  
Old October 4th 06, 04:39 AM posted to microsoft.public.windows.vista.networking_sharing
Leightynet
external usenet poster
 
Posts: 5
Default Ping Localhost Returns Invalid IP

Thanks for the reply. The trouble was not in LMHOST.SAM but in HOSTS.
There was a double entry for localhost:
127.0.0.1 localhost
::1 localhost

The load of VistaRC1 was a clean install on a fresh partition. Only MS apps
have been loaded - Office 2007 and VS2005.

"RobertLane" wrote:

I think this may be because the LMHOST.SAM file that installs with Vista does
not have the last entry "remarked out" and thus it actually loads the 127
address for localhost.

"Leightynet" wrote:

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("REMOT E_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.

  #5 (permalink)  
Old October 4th 06, 12:35 PM posted to microsoft.public.windows.vista.networking_sharing
RobertLane
external usenet poster
 
Posts: 20
Default Ping Localhost Returns Invalid IP

I found the same entries in my hosts / lmhosts.sam files from a fresh install
of Vista RC1. Ihave tried to edit them using notepad but get an error
message that I can't save to the ...etc directory. I can rename and delete
but can't seem to save anything into that directory. I think I have
everything set to be fully priviledged but no luck updating my hosts &
lmhosts - any ideas / did you have this problem?

"Leightynet" wrote:

Actually I found the problem. It was actually in the hosts file rather then
lmhost.sam. There was a double entry in it for 127.0.0.1.
127.0.0.1 localhost
::1 localhost

This was in a clean file from a clean install. I am reasonably sure it was
there from the time I loaded RC1. Since I'm evaluating the basic environment,
I have not loaded anything other than MS apps - Office 2007 and VS2005

Michael

"RobertLane" wrote:

I think this may be because the LMHOST.SAM file that installs with Vista does
not have the last entry "remarked out" and thus it actually loads the 127
address for localhost.

"Leightynet" wrote:

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("REMOT E_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.

  #6 (permalink)  
Old October 4th 06, 02:06 PM posted to microsoft.public.windows.vista.networking_sharing
Peter Thomas
external usenet poster
 
Posts: 2
Default Ping Localhost Returns Invalid IP

RobertLane wrote:
I think this may be because the LMHOST.SAM file that installs with Vista does
not have the last entry "remarked out" and thus it actually loads the 127
address for localhost.

"Leightynet" wrote:

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("REMOT E_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.


I think you will find that the ::1 is actually an entry for the IPV6
localhost address...

I'm not able to play with my Vista right now, but do you have IPv6
enabled on that machine?

Peter
  #7 (permalink)  
Old October 4th 06, 02:34 PM posted to microsoft.public.windows.vista.networking_sharing
Leightynet
external usenet poster
 
Posts: 5
Default Ping Localhost Returns Invalid IP

Regarding saving the file to the etc folder... no trouble there. The machine
is part of my development domain and I was logged in with the domain admin
account so I had full permission.

Regarding IPv6, that is enabled by default but I have nothing that uses it
so I disabled it. I suspected it was part of the support for it but have not
found any documentation to back it up yet.

If anyone knows where this is documented, please post it here. This was the
1st case I've run into where my software broke because of IPv6 so it would
help to know what else to expect as adoption of IPv6 at some point is a given.

"Peter Thomas" wrote:

RobertLane wrote:
I think this may be because the LMHOST.SAM file that installs with Vista does
not have the last entry "remarked out" and thus it actually loads the 127
address for localhost.

"Leightynet" wrote:

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("REMOT E_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.


I think you will find that the ::1 is actually an entry for the IPV6
localhost address...

I'm not able to play with my Vista right now, but do you have IPv6
enabled on that machine?

Peter

  #8 (permalink)  
Old October 5th 06, 02:52 PM posted to microsoft.public.windows.vista.networking_sharing
Peter Thomas
external usenet poster
 
Posts: 2
Default Ping Localhost Returns Invalid IP

I tried a few quick things last night

By default I DO have IPv6 enabled.

ping localhost

sure enough; this used by default IPv6

ping -4 localhost

This now uses IPv4.

Peter
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 06:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.Search Engine Optimization by vBSEO 3.0.0 RC6
Copyright ©2004-2012 Vista Banter.
The comments are property of their posters.