Access to the local host on the host machine with VMware Workstation 8 for ASP.NET development test

I am running an ASP.NET development server (which comes with MS Visual Studio 2010) on my Windows 7 machine. I am currently developing an ASP.NET C # web application and testing it on a computer running Windows 7. I need to translate my web browser to this address:

http: // localhost: 59215 / Default.aspx

I also have VMware Workstation 8 installed on this Windows 7 with a different OS as virtual machines. I need to try to download my web application from these virtual machines, but when I type the address above, I get the message "Can't show the page" in the browser. Please note that I can access the Internet from the virtual machine itself, but for some reason the local host on the host machine is not available.

Any ideas how to set this up?

+6
source share
2 answers

OK, I get it!

For those who are interested, here's how:

Say my development URL on the host is: http: // localhost: 59215 / Default.aspx

Download this utility called tcpTrace and run it on the host machine. When he starts to configure it as follows:

Listen to port #: 80 Destination Server: localhost Destination Port #: 59215 (which will be different in your case) 

Click OK and release tcpTrace on the host computer.

In the virtual machine, go to the browser on the IP address of the host computer, for example, in my case: http://192.168.0.4/Default.aspx

and it will work!

PS. To get the IP address on the host machine, run ipconfig (in a command prompt window). Your IP address will be displayed in the "IPv4 Address" line for the network you are connected to.

PS2. Also, my Windows 7 (host) does not come with third-party antivirus and firewalls. It has a built-in Windows firewall and MS Security Essentials as AVP. Therefore, if your setup is different, you need to open the incoming port 80.

PS3 Speaking of the VMWare workstation, the virtual machine network adapter parameter is set to "NAT: used to share the host IP address" because it was installed out of the box when it was installed.

+11
source

localhost is a local machine (for OS).

I'm not sure if the VS server VS will allow external connections, you can install IIS - anyway, you will have to open the Windows firewall to allow external connections.

I am not a VMWare user, but each OS will have its own IP address (?) - and how will you connect to the Windows 7 / IIS image. http://the.ip.address.of.the.win7.image/

0
source

Source: https://habr.com/ru/post/913222/


All Articles