8/28/2008
LifeCycle Solutions - Home ( the software development blog )
 

<August 2008>
SunMonTueWedThuFriSat
272829303112
3456789
10111213141516
17181920212223
24252627282930
31123456

Subscribe to this feed:

RSS 2.0 | Atom 1.0 |CDF





Add to Technorati Favorites

Thursday, February 21, 2008

One of the challenges of being a contract software developer is that we often work remotely on a clients' network via VPN.  Each client has their own VPN client, Source Control, and development environments.  In many cases, development platforms just aren't made with this in mind.  It's only as of VS 2005 that you can even switch Source Control Providers easily! If you've ever had to connect to Microsoft SourceSafe over VPN, you know it's still not designed with remote work in mind.  It relies on a network file share, which can be problematic over VPN.  It does ship with a WebService based solution, but this may not be feasible for the client to install in all cases.

The Problem

When connecting over VPN, the main problem is that there is no option to specify the network user to connect with.  For example, you may log in to the clients' VPN, but still attempt to access resources using your machine's local account.  When doing things like mapping drives, it's easy to supply an alternate username and password.  However, with SourceSafe, there is no option to supply network credentials when connecting (which are totally different from the SourceSafe credentials).

The Solution

Enter the Windows runas command.  This command lets you run any application as though it were a different user.  In this case, you want to run Visual Studio as though you were that network user.  To set this up:

  • Create an empty text file named "RunVisualStudioAs[DomainUserName].bat"
  • Edit and Add the following:
    • runas /netonly /user:[Domain]\[User] "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv.exe"
  • Save.

Then, when working on the project, just launch VS using the batch file.  You will be prompted for a password each time, since runas does not allow entering a password in the commandline for obvious security reasons.  But there are 3rd party runas replacements which can help you get around this.

One other word of caution:  Due to the chatty nature of Windows file sharing, this will still be very slow over a remote connection.  Turning off Anti-Virus helps a little, and there are some additional speed tips here. It's definitely not the ideal solution, but it can be done!

Posted by Daniel Root

© 2006 LifeCycle Solutions, LLC | All Rights Reserved