More on Remote Connections to the VS Web Server

Well, I may have been a little premature in my post below on using port forwarding to connect a remote client to the Visual Studio development web server. When I tested the approach my app was able to connect and begin a request, but there was a database problem that was masking the result, and I assumed that when it was fixed the request would round-trip successfully. Instead I found that the request wasn’t completing because the connection was being reset. I still think the technique will work, but since I am not sure why it didn’t in this case I thought I should clarify the post. Here’s what I saw:

I set up the services to run under the development server on localhost:35000. I then started Portforward.exe and set up a redirect from (the dev machine’s local address) to localhost:35000. The remote client is an iOS app running on an iPod Touch connected via wifi with the address The request was received successfully, the service processed the request successfuly, the result was serialized successfully, but once I let the program run out of the service method the client would report a connection reset. This was tested from the iPod, as well as from a simple console client on another windows box, with the same result.

I fired up Wireshark and monitored the exchange. The inbound request was sent in two packets. The first contained the POST header, and the second contained the request body. After the service finished processing the response header packet was written (including 200 OK and the correct content length), and then RST was sent and the connection was dropped. So, given this scenario I am sort of suspicious that the problem lies with Portforward.exe, but I don’t have time to find a different forwarder, or write one, and test it again. Until I do I can’t really say that the technique will work. In the end I had to go ahead and install IIS to enable the full debugging scenario I needed.

Leave a Reply

Your email address will not be published. Required fields are marked *