views:

302

answers:

3

I have a .net 2.0 WinForms application that uses .net remoting to connect to a server in our DMZ. That side of it is running fine, but I want to debug the services I've installed on that machine. I can get everything set up fine, but as soon as I have to restart Visual Studio 2008, the port used to connect back to my machine changes, and I have to call my network admin to change the port on the firewall appliance. They will not open a huge range of ports, because that machine has a VPN connection with another company and they don't want to open any more routes into our network than they have to.

How can I restrict the port the .net debugger uses on my machine to connect back to it from the remote machine? I've tried messing around with a couple of things in Component Services, but it didn't seem to make a difference.

A: 

What about Terado? Or any other IPoverIP?

I would think it would be easier to be behind a home router of some sort, every time you connect, you just configure the (they usually call it the "DMZ" port) to redirect dynamically for you also.

Worst case scenerio, try something like this, or, even.

Maybe better on the other overflow forum?

RandomNickName42
A: 

The remote application is running on an application server in the DMZ on our corporate network. I'm connecting to it via a laptop within our network, so none of those options will work. I would not be allowed to bring in a router. The first two options appear to be *nix solutions, so those won't work (the server and the laptop are both Windows machines). The last is a proxy server, which I definitely won't be allowed to install.

The big problem is that connection back - from the DMZ server - can be on any number of ports that COM uses. So far my only option has been to try to connect, see what port it used, and have the network admin open that port (and close the other ones, as for security purposes they aren't going to leave open any other ports). If I have to start a new session of Visual Studio for whatever reason (usually because it crashed from having forms open in design mode), it'll use a different port.

Brian Kavanaugh
A: 

It appears I have finally found a solution. A post here pointed me in the right direction, following these instructions. I had tried something very similar to this before, but I'd only tried restricting the range on one computer or the other - not both at the same time. I've restarted Visual Studio about a half-dozen times now, and it has always chosen a port for DCOM in the range I've restricted it to.

Brian Kavanaugh