469,307 Members | 1,566 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,307 developers. It's quick & easy.

Retaining local file system access while impersonating to access a remote drive

Is it possible to retain local file system read, write, delete access while
impersonating for access to a remote drive in a different domain? I need to
be able to move files from a local computer to a remote computer. do i have
to copy them from the local computer to the remote computer then delete them
fromt the local computer after undo-ing the impersonation? Or is there a way
to retain access to both the local computer and the remote computer by while
impersonating the use that has access to the remote computer? The File.Move
requires read and write access to both the filesystem of the source and the
destination because it deletes the file from the source when it is copied to
the destination. My current solution is to impersonate, copy local to
target, undo impersonation, delete locals. But i would like to be able to
impesonate, move local to target, undo impersonation.

Nov 16 '05 #1
3 2517
Daniel,

If you don't have full rights for a move in this manner, then you will
have to switch impersonation contexts. You can not have the rights merged
from two different users, as the current thread only runs in one user
context.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Is it possible to retain local file system read, write, delete access
while
impersonating for access to a remote drive in a different domain? I need
to
be able to move files from a local computer to a remote computer. do i
have
to copy them from the local computer to the remote computer then delete
them
fromt the local computer after undo-ing the impersonation? Or is there a
way
to retain access to both the local computer and the remote computer by
while
impersonating the use that has access to the remote computer? The
File.Move
requires read and write access to both the filesystem of the source and
the
destination because it deletes the file from the source when it is copied
to
the destination. My current solution is to impersonate, copy local to
target, undo impersonation, delete locals. But i would like to be able to
impesonate, move local to target, undo impersonation.

Nov 16 '05 #2
ahh, but when i am impersonating the user that has access to the remote
drive, i can still create directories

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
Daniel,

If you don't have full rights for a move in this manner, then you will
have to switch impersonation contexts. You can not have the rights merged
from two different users, as the current thread only runs in one user
context.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Is it possible to retain local file system read, write, delete access
while
impersonating for access to a remote drive in a different domain? I need to
be able to move files from a local computer to a remote computer. do i
have
to copy them from the local computer to the remote computer then delete
them
fromt the local computer after undo-ing the impersonation? Or is there a
way
to retain access to both the local computer and the remote computer by
while
impersonating the use that has access to the remote computer? The
File.Move
requires read and write access to both the filesystem of the source and
the
destination because it deletes the file from the source when it is copied to
the destination. My current solution is to impersonate, copy local to
target, undo impersonation, delete locals. But i would like to be able to impesonate, move local to target, undo impersonation.


Nov 16 '05 #3
and i can still create directories in the local file system and add files to
my created directory, it only chokes when i try to add/change files in the
existing directories

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:%2****************@TK2MSFTNGP10.phx.gbl...
Daniel,

If you don't have full rights for a move in this manner, then you will
have to switch impersonation contexts. You can not have the rights merged
from two different users, as the current thread only runs in one user
context.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Daniel" <so*******************@yahoo.com> wrote in message
news:%2***************@TK2MSFTNGP09.phx.gbl...
Is it possible to retain local file system read, write, delete access
while
impersonating for access to a remote drive in a different domain? I need to
be able to move files from a local computer to a remote computer. do i
have
to copy them from the local computer to the remote computer then delete
them
fromt the local computer after undo-ing the impersonation? Or is there a
way
to retain access to both the local computer and the remote computer by
while
impersonating the use that has access to the remote computer? The
File.Move
requires read and write access to both the filesystem of the source and
the
destination because it deletes the file from the source when it is copied to
the destination. My current solution is to impersonate, copy local to
target, undo impersonation, delete locals. But i would like to be able to impesonate, move local to target, undo impersonation.


Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Robert Tarantino | last post: by
1 post views Thread by Leonid | last post: by
2 posts views Thread by Jerad Rose | last post: by
2 posts views Thread by LiveCycle | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Geralt96 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.