Questions tagged [impersonation]

Impersonation is a process whereby an application assumes another identity or security context during execution.

1522 questions
3
votes
0 answers

RunAs and C# process - impersonate user credentials not working

I want to create a simple application to launch another application under different credentials. Both application are on my laptop which is not on the domain. I need to run SSMS using a domain user credentials. When I use the following runas…
Baral
  • 3,103
  • 2
  • 19
  • 28
3
votes
0 answers

Impersonation is not working with windows 7

i am trying to impersonate another user before running a connecting to an API. my code has worked fine on windows xp, but 1 user received a windows 7 machine and the code no longer works. there is no error, imperonsation seems to be working, but…
3
votes
1 answer

Access web.config settings using WCF Impersonation with net.tcp binding

I'm trying to use impersonation with my WCF service (using net.tcp binding) hosted in IIS 7. I've got to the point where it's impersonating the client but whenever I try to access any configuration settings in the web.config using…
James_2195
  • 1,113
  • 1
  • 12
  • 17
3
votes
3 answers

Exchange Impersonation in Service Account: Autodiscover service couldn't be located

Sending a simple email through ews is working as intended - from my account to my account: ExchangeService ews = new ExchangeService(ExchangeVersion.Exchange2010); ews.AutodiscoverUrl("myname@mydomain.com"); EmailMessage email = new…
Alexander
  • 19,906
  • 19
  • 75
  • 162
3
votes
1 answer

/NetOnly Impersonation of a domain user from a non-domain PC

I believe I've read all the relevant Process.Start impersonation questions - at least all I could find via Google, but I haven't found one that matches this situation (and 90% are re: ASP which is a whole different ballgame) Scenario: We've got a…
Basic
  • 26,321
  • 24
  • 115
  • 201
3
votes
1 answer

Impersonating user with Entity Framework

So we have our web app up and going with entity framework. What we'd like to do is impersonate the current user when we're accessing the DB. We're not interested in setting impersonation up in our web config. Ideally using something like this: …
RailRhoad
  • 2,128
  • 2
  • 25
  • 39
3
votes
1 answer

Windows impersonation token expiration time

Does anyone knows what is the expiration time for windows tokens created by LogonUser windows API method? I was about to test it myself by polling whether the token changed each 10 minutes, but maybe it would be easier to ask what is the expiration…
A.D.
  • 425
  • 3
  • 15
3
votes
1 answer

Start/Stop Window Service from ASP.NET page

Is there a way to start / stop a windows service of a server in a different network (not \\) from an asp.net page? I tried using ServiceController but it's only work if it's in the same network.
IlanKogan
  • 137
  • 1
  • 9
3
votes
1 answer

C# Directory.exist always return false on the local network

I'm trying to check wether a directory exist on not or a local network. After some research on stackoverflow and MSDN, I develop my code by using impersonate method. The problem is it's not working very well, The Directory.exists() method always…
Adrien A.
  • 441
  • 2
  • 12
  • 31
3
votes
2 answers

How to get security token of a windows service's LogOn user?

I need to impersonate the LogOn user account of a particular windows service. I have been able to get the username using WMI (sadly the LogOn user identity doesn't seem to be exposed using any of the regular windows service related .NET classes).…
Manas
  • 521
  • 8
  • 26
3
votes
1 answer

Why CreateProcessAsUser requires interactive window station on Vista/Windows 7?

I had to delve into this because the code that worked fine on Windows 2003/XP doesn't on Windows 7. Application launched by the use of CreateProcessAsUser fails with 0xc0000142 error code. The difference between my old code and one available from…
Oleg Zhylin
  • 1,290
  • 12
  • 18
3
votes
2 answers

Verify that the currently authenticated windows user has delegation rights

Given that I have a WCF service using windows authentication, and I want to impersonate them and call another WCF service, like so: using (ServiceSecurityContext.Current.WindowsIdentity.Impersonate()) { // call another WCF service } I've set…
Gareth
  • 2,424
  • 5
  • 26
  • 44
3
votes
0 answers

Impersonation/Delegation with SourceSafe Interop

I'd like to open a source safe database using Interop.SourceSafeTypeLib 5.2.0.0 on SourceSafe 8. This should happen in a server service running under 'network service' account. The server service should use the interop to open ss database. The…
3
votes
1 answer

The account does not have permission to impersonate the requested user

I am getting this error while try to accessin the resource mailbox. pls any one help me on this . I am new to EWS. I am able to access the resource mailbox through OWA(Outlook web app). But i am not owner of this mailbox as it is shared mailbox. my…
3
votes
2 answers

ASP.NET to host Active Directory RSAT powershell scripts--DC hangs up

I'm working on making a ASP.NET (C#) app that is basically a gateway for running Powershell scripts for routine admin tasks. Some of these scripts use the ActiveDirectory RSAT module and I'm finding that some of these cmdlets will not run correctly…
Iron Savior
  • 4,238
  • 3
  • 25
  • 30