ASP.NET Dev Server – Access from remote client

We are getting close to releasing one of the projects at work. A website developed in ASP.NET using Visual Studio 2008.

With a project like this you need to test it in multiple web browsers to ensure that you cover all the bases when it comes to release time. The last thing you want is for the site to work in the specific version of a browser but not earlier versions of that browser or other browsers.

Testing in multiple browsers is easy enough, you just install them on your local development machine. However, testing a site in both IE7 and IE8 (for example) becomes more difficult. Even more so when you want to test on a Mac running OS X.

There are a number of immediate options that string to mind:

  1. You could develop against IE7 then upgrade to IE8 to fix any bugs.
  2. Develop against IE8 and downgrade to IE7 for testing and debugging (reverse of above).
  3. Test using VMs or remote client machines.

The first two options would be nice, but there are issues. Supposing the “fixes” break the site against the initial browser version you developed again. Add to that that the un-installation of IEx is not something I ever want to undertake after previous experience!

Option 3 sounds good, except that Microsoft have prevented you from accessing the ASP.NET Development Server from anything but localhost. Therefore you cannot browse to the site from any remote machine.

After some googling, I found the solution.

Visit the site for the complete lowdown, but for future reference by myself (and in case that site goes down at any time for any reason), here is a brief account.

  1. Download the Microsoft SOAP Toolkit from here.
  2. Install it.
  3. Start Microsoft SOAP Toolkit Version 3 > Trace Utility.
  4. Select File | Formatted Trace.
  5. You will be prompted for the port to listen on and the machine/port to forward to.
    • Local port # is the port the remote device will connect using.
    • Destination host should remain as localhost.
    • Destination port is the port number that ASP.NET Development Server is using.

If you now connect to the IP address or hostname of your development machine using the local port specified above, you should see the site you are developing against and can debug as usual.

Neil

4 Comments

  1. Whoah nice! You save my day! :-)

    ReplyDelete
  2. With firewall off, I get connection refused.

    Tried port forwarding and connecting by cable directed to the modem

    Any sugestion ?

    ReplyDelete
  3. @Tiago Machado:
    Please explain your setup to me. I was using an iPhone connected via wi-fi to our network and had no issues.

    ReplyDelete