Impersonation

T

Thorsten Schiller

Hi,

I'm using impersonation in an ASPNET app, where the impersonated user is
configured in the web.config:
<identity impersonate="true" userName="userWithAppropiateRightsForTheApp"
password="cool"/>

So far, so good. It seems to work in come ways, i.e. the app can access a
network share which cannot be accessed by the ASPNET account. The ASPNET
account is still configured in the machine.config, but the account was added
to the Administrators group (to enable impersonation thru LogonUserA, see
below).

<processModel ...userName="machine" password="AutoGenerate" .../>

But, when I call System.Diagnostics.Process.Start("LegacyApp.exe", "args"),
LegacyApp runs in the ASPNET account! This is still true if I impersonate
the user with Win32 API calls (LogonUserA, DuplicateToken, ...).

I don't understand this. What does impersonation means? Which code is
executed in the impersonated account and which not? Is there a way to spawn
a process from an ASPNET app that runs in an account that I specify?

Any help is appreciated.

Thanks, Panther.
 

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top