Impersonation is a process whereby an application assumes another identity or security context during execution.
Questions tagged [impersonation]
1522 questions
13
votes
2 answers
create interactive elevated process from windows service and show to logged-on user
I have a service that spawns a WPF application process when a user logs on.
But for some reason the WPF application gets killed about 10 minutes after it has been created? The termination is immediate with no traces found in the Event Log nor are…

Cel
- 6,467
- 8
- 75
- 110
13
votes
2 answers
Is .NET impersonation logon thread-safe?
If using code like the following to impersonate another user,
[DllImport("advapi32.dll", SetLastError = true)]
private static extern bool
LogonUser(string lpszUsername, string lpszDomain,
string lpszPassword, int dwLogonType,
…

Charles Bretana
- 143,358
- 22
- 150
- 216
13
votes
3 answers
Secure windows Impersonation?
In my WPF application I want to allow administrators to test a database connection using integrated security for various other users. So I have a form that allows the admin to enter the domain, username and password and then test it. I am able to…

user1336827
- 1,728
- 2
- 15
- 30
13
votes
2 answers
The right use of
In my Website, Users who has logged in are able to change their profile pictures, and this process includes saving the uploaded image to a folder in the website's root directory.
When I tested it, I received an Error that I should grant access to…

Ali Bassam
- 9,691
- 23
- 67
- 117
12
votes
2 answers
Impersonation and CurrentUser Registry Access
Environment: Windows XP SP3, C#, .Net 4.0
Problem:
I'm attempting to add access to an impersonated users registry hive in an impersonation class and I'm running into issues based on the type of user being impersonated (or more accurately the…

JoshHetland
- 1,273
- 1
- 12
- 22
12
votes
1 answer
Impersonate java.lang.IllegalStateException: UserDetailsService is required
I am trying to implement the impersonate using SwitchUserFilter in Spring but I'm getting an error. The project runs good without this implementation. Also the project is using Java annotations not xml configuration and has SecureAuth…

Angel Cuenca
- 1,637
- 6
- 24
- 46
12
votes
1 answer
How to impersonate user using SwitchUserFilter in Spring?
I do not have knowledge on Spring Impersonating user.
I have gone through some sample code of configuration for impersonating user and noticed that SwitchUserFilter is used for this implementation.
How to implement impersonate user using Spring…

Sachi-17
- 499
- 4
- 12
- 29
12
votes
9 answers
Why is my MVC app trying to log into my DB as my machine, and not as the App Pool identity?
When I try and access my newly deployed (to lcoal IIS 7.5) MVC4 app, I get the error:
Login failed for user 'DOMAIN\MACHINE-NAME$'
where the '$' is appended and not part of the machine name.
The connection string in web.config looks like…

ProfK
- 49,207
- 121
- 399
- 775
11
votes
3 answers
Impersonating a Windows user
I am using the code to impersonate a user account to get access to a file share.
public class Impersonator :
IDisposable
{
#region Public methods.
// ------------------------------------------------------------------
///
…

Kyle Johnson
- 763
- 1
- 13
- 31
11
votes
2 answers
Copy files over network via file share, user authentication
I am building a .net C# console program to deploy file to a windows file share server (folder that is being shared). The path is :: \\192.168.0.76\htdocs\public
On running I am getting the error:
[09:35:29]: [Step 1/3] Unhandled Exception:…

Patrick Lorio
- 5,520
- 11
- 45
- 74
11
votes
2 answers
GCP - Impersonate service account as a user
I would like to allow users to impersonate a service account to do operations on a long running process.
However, all the code examples illustrate a service account impersonating another service account.
Can users directly impersonate a service…

A Clockwork Orange
- 23,913
- 7
- 25
- 28
11
votes
3 answers
How to Impersonate a user for a file copy over the network when dns or netbios is not available
Possible Duplicate:
Accessing Password Protected Network Drives in Windows in C#?
I have ComputerA on DomainA running as userA needing to copy a very large file to ComputerB on WorkgroupB which has the ip of 192.168.10.2 to a windows share that…

Scott Chamberlain
- 124,994
- 33
- 282
- 431
11
votes
2 answers
Either a required impersonation level was not provided, or the provided impersonation level is invalid
I'm having some issues with a WCF service and Impersonation, I've distilled this to a simple method below. The WCF service is currently self hosted in an exe. The exception message is "Either a required impersonation level was not provided, or the…

Martin Clarke
- 5,636
- 7
- 38
- 58
10
votes
3 answers
Impersonate with username and password?
WindowsIdentity identity = new WindowsIdentity(accessToken);
WindowsImpersonationContext context = identity.Impersonate();
...
context.Undo();
Where do i declare a administraotr UserName and Passowrd ?
the accessToken param doesn't help me too…

Royi Namir
- 144,742
- 138
- 468
- 792
10
votes
3 answers
spring security (3.0.x) and user impersonation
In my web application, there are times when an authenticated admin might want to impersonate another valid user of a system without having to know that user's password.
How can I use Spring Security to give admin users the ability to impersonate…

Erik
- 997
- 4
- 14
- 24