Connect remotely to WebDev.WebServer.exe
Asked Answered
A

5

14
  1. Developing an ASP.Net website.
  2. Running IE8.
  3. Need to test website under IE6.
  4. MultipleIE6 install broken by IE8 install (can't type in textboxes, yes I deleted cache, yes I re-registered the dll's).
  5. Created VPC running IE6.
  6. Can't connect to host WebDev.WebServer.exe.

Is there any way to configure WebDev.WebServer.exe so that it will accept remote connections?

Antemortem answered 25/3, 2009 at 19:47 Comment(0)
C
16

The workaround for the way that webdev.webserver is crippled to refuse remote requests is to use a lightweight proxy server running on the same host as webdev.webserver. The remote browser then uses the proxy and its requests appear to webdev.webserver like requests originating from localhost. I've used Privoxy succesfully.

Sample config:

  • Configure Privoxy to listen on an IP address that is routable from your VM (eg 192.168.1.1:8118). You can put an IP address on a looback on your host OS and use NAT with the client OS.
  • Configure your browser(s) in the VM to use 192.168.1.1:8118 for its proxy for all connections including localhost.
  • Start your app in webdev.webserver
  • With your VM browser go to the same URL as you would with a browser on your host OS (eg http://localhost:3254)

From the perspective of webdev.webserver the requests will originate from Privoxy on 127.0.0.1 and it will happily serve them up.

UPDATE These days, I am using Fiddler2 for this. Fiddler has an option in Tools > Options > Connections to "Allow remote computers to connect." But also note that IISExpress can be configured to accept remote connections.

Cotoneaster answered 20/5, 2009 at 17:8 Comment(7)
It's important to note that other computers can do request to your WebDev.WebServer if you open the port (8118) in your firewall for Privoxy (for TCP requests). Also, the only configuration needed for Privoxy is to find the listen-address config in the Main Configuration and set it to the appropriate value (listen-address 192.168.1.1:8118). It works really well and isn't too hard to set-up.Angeliaangelic
FWIW. I posted step-by-step instructions for setting this up here: thoughtfulcode.wordpress.com/2009/11/13/…Cotoneaster
A variation of this strategy is to run an SSH server like WinSSHD on your host system and then use an ssh client to either create a SOCKS4 proxy over SSH or do simple SSH port-forwarding (-L in openssh).Cotoneaster
This privoxy + NAT solution with an XP SP3 on VPC worked well with IE6, but then I installed IE7, configured the proxy the same way, and it stopped working. I got the "Internet Explorer cannot display the webpage" message. The proxy and the dev server is still running. Does anyone has any idea how to make it work with IE7?Heisenberg
Have you tried using http: //localhost./ (note the '.' appended to localhost) in IE7?Cotoneaster
Yes, I have. Same result. In the meanwhile I have installed an IIS express, and with that I was able to make it work. But I would be very curious about this issue, so I would welcome other suggestions. Thanks!Heisenberg
I just did this using TcpTrace from pocketsoap.com - free, with reasonably friendly GUI. Proxied from my XPSP3+IE8 VM to the ASP.NET Dev Server in a few minutes total. Runs faster than tunner.jar...Liver
G
6

AFAIK, WebDev is coded to specifically reject all external connections... so the short answer would be "no".

Best thing to do would be simply publish the website to your VPC running IIS and test it that way.

Gabionade answered 25/3, 2009 at 19:50 Comment(1)
It's quite a bit more friction to deal with publishing IIS or even just configuring local IIS to serve every project. You don't get to enjoy the Netbeans-like integrated web server and configuring non-admin debugging is a further complexification. You can instead take a small hit on configuring a personal proxy up front and forget about why it works after that.Cotoneaster
O
2

I ran into this same issue, and after some research, found that the method detailed at this site worked for me: http://www.funkymule.com/post/2009/04/17/Making-ASPNET-Development-Server-Listen-for-Remote-Connections.aspx

It involves modifying and reassembling the Webdev server and DLL, but once it's all up and running, I've been able to use older versions of Internet Explorer running in VPC/XP Mode to connect to the WebDev server running on the host machine via the internal network IP (192.168.x.x).

Opacity answered 16/3, 2010 at 13:49 Comment(2)
In the comments thread in that article, a user explains how to do a simple port forward. This seems more maintainable than hacking the DLL...funkymule.com/post/2009/04/17/…Keek
Here is command line example for port forwarding... netsh interface portproxy add v4tov4 listenport=2221 listenaddress=xxx.xxx.xxx.xxx connectport=2222 connectaddress=localhostGastroenteritis
P
1

Hmm i am not shure this works, but try adding the WebDev.WebServer.exe to be unblocked from your Windows Firewall.

If this doesn't work you have to install IIS and set a virtual directory directly on your development folder.

Potpie answered 25/3, 2009 at 19:50 Comment(0)
W
1

I use one of Microsoft's VPC images to test IE6 using the debug webserver, so I don't know what could be causing your issues. Sounds like it could be a networking issue with the virtual machine.

Also IEtester works well for quick checks of rendering and functionality. I have yet to see any major differences between the behavior in IEtester and the real IE6 under XP, but the possibility exists so I still check with the virtual machine before release to production.

http://www.my-debugbar.com/wiki/IETester/HomePage

Wishful answered 25/3, 2009 at 21:3 Comment(1)
It doesn't work for me either - Ariel, what's your VPC configuration? Are you running XP Mode? What's the network configuration and integration settings? You didn't do anything else, like hacking the local hosts file?Liver

© 2022 - 2024 — McMap. All rights reserved.