1

trying to setup my virtualbox copy of windows xp and have it be able to access my host computer's (win7) IIS 7 express localhost:33369

the virtualbox ipconfig

IP Address: 10.10.2.15
subnet: 255.255.255.0
Default gateway: 10.10.2.2

the win 7 ipconfig on the virtualbox adapter

 IPv4 Address. . . . . . . . . . . : 192.168.56.1
 Subnet Mask . . . . . . . . . . . : 255.255.255.0
 Default Gateway . . . . . . . . . :

in xp, I tried adding 10.0.2.2:33369 staging.com to the ..etc/hosts file, but when loading staging.com up in ie6, it doesn't route to my win7 host's version of localhost:33369.

any idea what I'm doing wrong? I think it works fine for port 80 (since this was working for xampp before).. I'm just not able to run this specific site on IIS's port 80 on the win7 machine. it must be on port 33369

Update: current state, on xp,

  1. i've set staging.com to 10.10.2.2 in hosts file
  2. navigating to stanging.com in ie6, i get my IIS default screen (port 80)
  3. Visual studio -> View in Browser -> launches site on win7 on localhost:33369
  4. in ie6 on xp, i visit staging.com:33369 and am unable to view the site on host machine
tester
  • 565
  • 8
  • 18

1 Answers1

3

The host file entry should be "10.0.2.2 staging.com" on the guest while the access URL on the guest web browser should be "http://staging.com:33369" instead.

user48838
  • 7,431
  • 2
  • 18
  • 14
  • Or "10.10.2.2" as it is stated as both - basically the entry should be the "default gateway" of the guest ipconfig output. Likewise for the access URL as well. – user48838 Jun 15 '11 at 18:47
  • so I set it up just like you said, when I visit staging.com, i hit the iis default on 80, but when I type http://staging.com:33369 it doesn't retrieve the page properly – tester Jun 15 '11 at 18:52
  • I'm on the NAT network adapter mode.. I don't think i have to do any port forwarding or anything else.. very confusing – tester Jun 15 '11 at 19:00
  • Is your IIS setup for 33369 and not 80 or is it setup for both ports? – user48838 Jun 15 '11 at 19:00
  • You do not need to touch any of port forwarding in this case if the services are on your host. You do need to have your host configured correctly though. – user48838 Jun 15 '11 at 19:04
  • my IIS has a default of 80 and visual studio automatically runs my app on port 33369, so I would say it is setup on both ports. any idea if that changes things? – tester Jun 15 '11 at 20:32
  • Run your app in Visual Studio, then try http://staging.com:33369 in Virtualbox IE6. If Visual Studio isn't running your app, you won't be able to get to it from the VM. No matter what, http://localhost:33369 in your VM will not do what you want. – Michael Lowman Jun 15 '11 at 21:24
  • @Michael, sorry I typo'd the question revision. I was actually unable to visit the site in ie6 when navigating to staging.com:33369, not localhost. sorry for the confusion.. – tester Jun 15 '11 at 21:28
  • You might also verify port 33369 on your host isn't being blocked by Windows Firewall or any third party firewalls (if you are using something else). – user48838 Jun 15 '11 at 22:46