I'm doing some WinForms development, running XP and VS 2005 (ancient, I know). I'd like to make sure my application can run without admin rights, but I'm too lazy to try to run VS as a non-admin, and I don't want to log in and out to test my app.
Is there a way I can just debug as a non-admin?
Is there a set of code access security attributes I can add to my code that will force me to run in the same permission set as a non admin?
Run VS as another user from your current logged in desktop session. See How to enable and use the "Run As" command when running programs in Windows. This means you won't have to log-in and out.
I would suggest that you just run your target application as another user, via RunAs, then attach the VS Debugger to the process (if needed), via the Debug > Attach To Process... menu item in Visual Studio.