Visual Studio RunAs

M

moondaddy

A few days ago I used the RunAs command for the first time to launch VS
under a different profile which had different security settings. Since then
I'v rebooted the machine several times and started VS several times assuming
I was starting VS as the same user I log into the machine with. However, it
seems to have remembered the user used when I did the RunAs command because
while using VS, I still have the same permissions as when I ran the RunAs
command.

Question: when using the RunAs command, does VS continue to run (even from
session to session) as that user until the RunAs command is used again?
 
S

Steven Cheng[MSFT]

Hi Moondaddy,

From your description, you've ever used "RunAs" to run VS (2005?) under a
different account, however, after you switch back to use the current logon
user, you found that it keep the "runas" user account setting ,correct?

As you mentioned the "the same permission", I wonder what is the permission
you mentioned or would you provide some further explanation of the behavior
which make you think the Visual studio is still keeping the "runas" user
setting instead of run as your current logon user's setting?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
 
P

Peter Ritchie [C# MVP]

"Run As..." executes an application under the context of a specific login.
When you terminate the application that context is no longer used for that
application because it's not running any more. If you double click on the
Visual Studio icon again, it will use the currently logged-in user, no
information about the user used when you used "Run As..." prior would be
known or used. You have to always use "Run As..." to run an application as a
user other than the currently logged-in user.
 
S

Steven Cheng[MSFT]

Hi Moondaddy,

Have you got any progress on this issue? If there is anything else we can
help, welcome to post here.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.




--------------------
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
From: (e-mail address removed) (Steven Cheng[MSFT])
Organization: Microsoft
Date: Tue, 29 Jan 2008 04:05:47 GMT
 
M

moondaddy

Thanks Peter,

this is what I thought. however, sometimes when trying to access certain
databases on my local machine in VS, I get an error saying that the user
'xxx' doesn't have permission to access that db. user 'xxx' is the user I
used for the runas command. however, I log onto the machine as user '123'.
Therefore, I'm thinking something became confused with using the runas
command.
 
S

Steven Cheng[MSFT]

Hi Moondaddy,

If some database connecction report the user access permission error, I
suggest you try the following things:

1. When the error occur, open TaskManager to see what exactly is the
running account of the Visual Studio process(devenv.exe)

2. Also, you can check in the project to see whether the user credentials
are persisted in some configure file. For example, using SQL Server
authentication mode with clear text username/password. Or for some
Reporting service project, it allows you to save clear text user
credentials.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.



--------------------
From: "moondaddy" <[email protected]>
References: <[email protected]>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top