Remote Access To ASP.NET Development Server

One of the more frustrating aspects of the ASP.NET development server is the impossibility of debugging on it from a remote location.  There are myriad use cases for this, such as doing browser dependent testing (IE6m for instance), debugging from mobile devices, etc. Being able to receive external traffic while debug locally is such a routine exercise (while doing Java professional work, for instance), that it befuddles the mind to think why Microsoft intentionally prevents developers from doing this.

One way around this silliness is by doing a port forward.  I downloaded a free command line utility called rinetd. All you have to do is tell it an open port to listen on and the port it should forward to. Then, you can point a virtual machine, mobile device, etc. to the specified port on your local machine and interact with it without any problems.

Here's an example config file for it:

0.0.0.0 8080 127.0.0.1 1395
0.0.0.0 9080 127.0.0.1 1395

This instructs the utility to listen on all interfaces (0.0.0.0) on port 8080 and forward it to address 127.0.0.1 on port 1395.  Below are the contents of a batch file I created to simplify running it from the command line:

@echo off
echo ================================================
echo Running rinetd with the following configuration:
echo ================================================
type rinetd.conf
rinetd.exe -c rinetd.conf

Happy debugging!

Print | posted on Sunday, May 30, 2010 10:14 PM

Comments on this post

# re: Remote Access To ASP.NET Development Server

Requesting Gravatar...
Thank you for sharing this. It's a real life saver especially when debugging and developing complex systems. I'm working on the following techniques for debugging and it helped immensely.

iPhone -> App Dev Server -> Sql Server
Android -> App Dev Server -> ...

And it's all running on a Mac with Parallels. rinetd works well. You rock!
Left by Chris Danielson on Jun 23, 2010 10:24 AM

# re: Remote Access To ASP.NET Development Server

Requesting Gravatar...
Awesome thank you! - works like a pro - can now demo my pages on my iPad, phone, etc.
Left by Don Dimon on Jul 27, 2010 2:11 PM

# re: Remote Access To ASP.NET Development Server

Requesting Gravatar...
I'm getting
rinetd: couldn't bind to address 0.0.0.0 port 8080
Am I doing something wrong?
Left by Zakhar on Aug 02, 2010 10:29 AM

# re: Remote Access To ASP.NET Development Server

Requesting Gravatar...
Than you very much. Very useful :)
Left by Fabrizio on Feb 10, 2011 8:23 AM

# re: Remote Access To ASP.NET Development Server

Requesting Gravatar...
u r a life saver. Many Thanks!
Left by jim on Mar 23, 2011 11:13 AM

# re: Remote Access To ASP.NET Development Server

Requesting Gravatar...
could you please describe the step by step process of accomplishing this? I have a web app that runs on local host and I want to be able to access it from other computers on the network
Left by Alex on Jul 11, 2011 6:02 PM

Your comment:

 (will show your gravatar)
 
Please add 6 and 5 and type the answer here: