Impersonation for Linqpad
Many times I am unable to execute operations on a remote machine and also I need to execute a set of operations on machine which is in another domain. In that case it would be nice If I can impersonate linqpad to use a different credential.
Few suggestions
1. Add Util.Runs (username, password)
2. Store a list of users with linqpad like connections so that the user credentials are encrypted and can be just called as
Util.Runas("refer User connection Name");
![](https://secure.gravatar.com/avatar/82fb38ad4e5ea90da981019ffe958cfa?size=40&default=https%3A%2F%2Fassets.uvcdn.com%2Fpkg%2Fadmin%2Ficons%2Fuser_70-6bcf9e08938533adb9bac95c3e487cb2a6d4a32f890ca6fdc82e3072e0ea0368.png)
-
AlexK commented
It would be very nice to be able to provide Domain\username and password for connection
-
Baljeetsingh commented
@Mike DiSibio thanks for tip it worked
-
Mike DiSibio commented
"Run as different user" might not work if your machine is not on the target domain. However, I have a batch script with the following line, and it allows me to execute LinqPad operations using domain credentials not on my machine:
runas /netonly /user:domain\username "C:\Program Files (x86)\LINQPad4\LINQPad.exe"
-
John commented
Can't you do this by shift+right clicking the linqpad executable and choosing "Run as different user?"