I have IIS running on my local machine and a couple of virtual machines so I can test Internet Explorer 6, 7, & 8. I can't seem to get them to find localhost. Any ideas?

link|improve this question
2  
The localhost in each VM is the VM itself. How did you setup the connection to the internet? In the VM's? Or are they connected at all to the internet? – Thiago M. Feb 21 '11 at 18:02
They're connected to the internet. In settings I have them set to shared networking (NAT). fyi, I also tried connecting via ip address which didn't work either – Pardoner Feb 21 '11 at 18:15
@Pardoner: [Late comment, but] in NAT mode, you cannot access the host from the VM or vice versa. – grawity Mar 23 '11 at 20:43
@grawity: Actually, the way NAT works, usually the guest can access the host. – Hello71 Mar 23 '11 at 21:47
@Hello71: Hm, didn't think about that. – grawity Mar 24 '11 at 15:38
show 1 more comment
feedback

2 Answers

Each virtual machine behaves exactly the same as a real physical computer on a network, so the host should be referred-to by its IP address, not by the name localhost.

If you do not know the host's IP address, enter ipconfig in a command-prompt (cmd). It will be in the entry next to the adapter. The adapter itself depends on the network configuration used for the VMs. If you are not sure which, the simplest solution is to also use ipconfig in the VM to figure-out the adapter.

The IP address of host and VM should agree on the network prefix, which could be 192.168.1.xxx or similar.

link|improve this answer
thanks. I figured this would be the case but I'm new to Windows and not sure how to make the machine available to the network. Can you point me in the right direction? – Pardoner Feb 22 '11 at 0:53
Are you using Virtual PC, VMware or VirtualBox ? – harrymc Feb 22 '11 at 6:57
feedback

You most likely have an active firewall.

That's why I had the exact same problem with my Virtual PC IE6 client...

Added a new inbound rule for port 80/443, and now I can access my IIS hosted websites on my local PC just fine.

To do this (on Windows 7), go to run, and type "windows firewall", then click on "Windows Firewall with Advanced Security"

Select "Inbound Rules" on the left, and then click New Rule.. on the right, then follow the wizard.

link|improve this answer
And that is why while using Win 7 and accessing the network I choose Work Network option since it disables most of the Windows Firewall rules and I can use whatever else to protect myself. – Darius Mar 23 '11 at 19:11
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.