Impersonation of a specified account to archive to File Shares

A

Aethyrial

What I'm attempting to do is make a basic extension of the
System.IO.File class with Copy and Move methods, but what I need to be
able to do is provide it with a credential to perform the file
operations in a new thread (for example I would have an Active
Directory account DW_Archiver with access to //server/folder). The
hope of this is to keep from having custom app pools because of file
access needs.

I'm not very familiar with impersonation and threading (or whichever
methodology I need to accomplish my goal), but hopefully someone can
point me towards some useful information or perhaps a recommendation
of a better way of implementing this.

Thanks
 
P

Popezilla

What I'm attempting to do is make a basic extension of the
System.IO.File class with Copy and Move methods, but what I need to be
able to do is provide it with a credential to perform the file
operations in a new thread (for example I would have an Active
Directory account DW_Archiver with access to //server/folder). The
hope of this is to keep from having custom app pools because of file
access needs.

I'm not very familiar with impersonation and threading (or whichever
methodology I need to accomplish my goal), but hopefully someone can
point me towards some useful information or perhaps a recommendation
of a better way of implementing this.

Thanks

I believe you want to follow this article in your code:
http://west-wind.com/weblog/posts/1572.aspx

I've used it to temporarily impersonate a higher priveleged user in
order to accomplish a particular operation, and then I release the
identity when I'm through with the operation.
 

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

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top