Impersonation is a process whereby an application assumes another identity or security context during execution.
Questions tagged [impersonation]
1522 questions
4
votes
1 answer
Windows impersonation LogonUser error
I am trying to use this code to logon to a restricted network share (with windows server 2012 on the head node) from my local machine (windows 8.1), and I can't seem to get it to work.
Both machines are on the same domain (verified), the account I…

Nicros
- 5,031
- 12
- 57
- 101
4
votes
5 answers
ASP.Net web application trying to use Impersonation and Delegation to connect to a File Server
I'm trying to use Impersonation and Delegation in an intranet ASP.Net web-app in order to pass authenticated users' credentials onto a File Server so it can write a file to a directory.
The web server and file server are two separate machines, but…

Kyle Johnson
- 763
- 1
- 13
- 31
4
votes
3 answers
Is there a way to create an ActionFilter that wraps the content of the Action in a using statement?
My scenario: My application is a Web Api 2 app using a business logic and repository layer for data access. The web application uses ASP.NET Impersonation to login to the database as the user accessing the website (authenticated via PKI). I have…

Adam Modlin
- 2,994
- 2
- 22
- 39
4
votes
3 answers
Classic ASP Impersonation problem on IIS7 Windows 2008 server
I am trying to write to a file on a server (web05) from a classic asp site running on Windows 2008 serer on IIS7 (webadmin). This fails and web05 logs an anonymous logon attempt during the course of the save operation.
Webadmin's site is running on…

nitech
- 1,822
- 3
- 21
- 35
4
votes
3 answers
Cannot delete file in share using impersonation on ASP.NET site
We have a web farm and are writing temp files for reports. We set up a file share and are using impersonation to write the temporary report files to that share. We gave the account doing the impersonation full control to the share and the folder…

George
- 7,864
- 5
- 29
- 25
4
votes
1 answer
Exchange Web Services, ASP.NET with Windows Auth, IIS 8.5 and Impersonation
I am being driven slowly and inexorably mad by the setup of IIS to allow access to Exchange Web Services from ASP.NET website that uses Windows Authentication. I have found literally dozens of articles on how to set this up, each of which seems to…

Jason
- 2,940
- 2
- 21
- 34
4
votes
0 answers
Access files/directories on a different domain
If I open up a File Explorer, and type \\somesite.com\d$ I will get prompted for credentials, and after entering them I get access to the file system. How can I do this in C# to access \\somesite.com\d$ to just see the files/directories in…

pkr
- 1,723
- 5
- 25
- 43
4
votes
1 answer
Cannot load the "comctl32.dll" DLL into memory whilst impersonating
I am trying to impersonate (whilst using COM) to access an external system, and I've had the error thrown.
Never seen anything like it before, and nothing on Google for it.
Could it be a trust issue? This code works fine when using a unit test to…

Stuart.Sklinar
- 3,683
- 4
- 35
- 89
4
votes
2 answers
Odd behavior of windows Impersonation
My windows application may require administrative privileges for some of it's sections.
For those cases, I'd like to ask the user for an administrator credentials, and use the following code to impersonate the administrator:
BOOL impersonate(LPTSTR…

Hans Pirson
- 41
- 2
4
votes
3 answers
Impersonating user for local file access in C#
The situation I'm trying to address is this: I'm writing an application which multiple users will have access to. Access is restricted based on Windows permissions for folders - users will be granted access to the folder containing the application…

andrewnd
- 101
- 1
- 1
- 7
4
votes
4 answers
IIS with a Web Application using Windows Authentication with Impersonation
Im not using this, but is a interesting question.
If i set a Web Application on IIS to use Windows Authentication and Impersonate the Authenticated User and my ConnectionString to a SQLServer database use Integrated Security=true;, my application…

jvitor83
- 220
- 8
- 20
4
votes
1 answer
Windows Impersonation Apache Module in Lazarus
I currently am in the process of porting several Windows desktop applications to a single web site.
The current setup includes several SQL server backend databases, configured with Windows Authentication (SSPI) only, and every user/group/role has…

geomagas
- 3,230
- 1
- 17
- 27
4
votes
2 answers
How to impersonate another Windows user, when using Windows authentication?
I have an ASP.NET application where only users authenticated by Windows (i.e. logged on user) have access to most pages. Now, my client wants to be able to 'log on' through this app, with a custom login dialogue/page.
Is Authentication the way to…

ProfK
- 49,207
- 121
- 399
- 775
4
votes
1 answer
CredWrite returning 1312 when called under impersonation
I have an application where the user enters credential using which I create a WindowsIdentity object which I subsequently use to impersonate the user corresponding to the entered credential and make the CredWrite call. However, it is…

Manas
- 521
- 8
- 26
4
votes
3 answers
How to impersonate a user to a WCF service?
I am authenticating a user on to a WCF service via IIS7 using Windows Authentication and ASP.NET Impersonation.
When debugging locally I am able to see the System.Security.Principal.WindowsIdentity.GetCurrent().Name as equal to my Windows…

aleafonso
- 2,244
- 8
- 38
- 58