Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Security > Impersonating for [Local] File Access

Reply
Thread Tools

Impersonating for [Local] File Access

 
 
David Williams
Guest
Posts: n/a
 
      02-17-2004
I have a DLL that I am writing that will be used from our web site. Within this DLL I must change the user that the code is running under so that I have access to several unmanaged API's, WMI, Registry read/write access, and creation and update of a number of files. The user that I am changing to is in a group (NOT an administator) that has the rights assigned in the group policy that I need. Changing to the user using the LoginUser API and setting the WindowsIndenity is fairly trival (once you know what needs to be done!).

The problem that I am currently struggling with is that a number of temporary files need to be created. When the call IO.Path.GetTempFileName is made an exception of "Invalid Directory Name" is thrown. I suppect that the problem is security related as when during debugging I attempt to see the Environment.SpecialFolders.ApplicationData directory it returns an empty string. Can anyone give me a pointer to what I need to do to continue forward?

TIA

David
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Impersonating =?Utf-8?B?TGVvbmFyZG8gQXJlbmE=?= ASP .Net 2 04-30-2006 03:37 AM
Compilation error when impersonating =?Utf-8?B?QWxpc3RhaXIgTGFjeQ==?= ASP .Net 3 07-19-2005 05:23 PM
Impersonating a User and Starting Standalone Processes stop workin =?Utf-8?B?SW5kZXB0aA==?= ASP .Net 1 04-01-2005 09:05 PM
Need Help Impersonating Across Process Boundaries hoochiegooch@hotmail.com ASP .Net 4 02-07-2005 04:40 PM
impersonating and LogonUser Jason ASP .Net 7 01-05-2004 03:35 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57