0

I'd like to give the ASPNET user Full Control over several files, but it looks like I'll need to get the account's token first. Does anyone know how to impersonate the ASPNET account within a desktop app?

Thanks!

Daniel Schneller
  • 13,728
  • 5
  • 43
  • 72
Charles
  • 6,199
  • 6
  • 50
  • 66

1 Answers1

2

Here is an example of impersonating another use with WindowsIdentity.Impersonate and another example. You will have to have a known process identity for ASP.NET to run under.

JP Alioto
  • 44,864
  • 6
  • 88
  • 112
  • Interesting, thanks! Do you know how I would get my own ASPNET password, and get the domain? – Charles May 29 '09 at 18:26
  • Yes, the article that's linked for known process identity (http://msdn.microsoft.com/en-us/library/dwc1xthy.aspx) describes how to set it. – JP Alioto May 29 '09 at 18:50