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?
|show 1 more comment|
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
The IP address of host and VM should agree on the network prefix, which could be 192.168.1.xxx or similar.
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.
For me, I had to edit my hosts file ("C:\Windows\System32\drivers\etc\hosts", requires Admin rights) and add an entry associated with my route IP like:
Then create a binding for laptop:50000 in IIS. I chose a high port like 50000 to make it easy to present multiple sites to Virtual PC (Windows security gets more meddlesome in the 4-digit and below ports).
I opened that port in Windows Firewall.
I made sure Virtual PC had only one Network Adapter setup, my Wireless Adapter, so it would get a real IP from my router.
That did it - any browser in WinXP on Virtual PC can access IIS sites I setup this way.