views:

16

answers:

1

I'm creating a WinForms application in Visual Studio 2008.

I want to run my application in the debugger and I want the application to run as a user other than the user running Visual Studio. What is the best way to do this?

A: 

If you have access to an OS that lets you have multiple terminal server sessions open, then simply open a new terminal server session as that user. With an administrator account running Visual Studio you should be able to debug the process in the other session.

You could add calls to your app to login as the desired user, but that isn't ideal since the environment is clearly not identical to the experience of running as that user.

Otherwise I think you need to look at remote debugging scenarios where VS is installed on a separate box.

Rob Walker