473,320 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2718
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert Tarantino | last post by:
Hello, I am trying to find a way to create a scheduled task or service that will copy my local profile folders under "Documents and settings" to a network drive. This would allow me to restore...
0
by: Daniel | last post by:
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...
9
by: Greg Gursky | last post by:
Hello: I'm doing some planning on a potential project with which I need some help. The database at the focus of this question is a MS Access database that is currently accessed by DAO from a...
4
by: Daniel | last post by:
If i log into my computer as domain A and user X and password Y but then I need to give C# application access to domain B as user F and password G. Is this possible? or do i have to log into the...
1
by: Leonid | last post by:
Hello I have VC++ .NET 2003 ATL Server project. In one of its method I need to write some information in a local txt file. This txt file and this ATL Server are on the same ‘C: \’ drive. When...
8
by: Sarah | last post by:
I need to access some data on a server. I can access it directly using UNC (i.e. \\ComputerName\ShareName\Path\FileName) or using a mapped network drive resource (S:\Path\FileName). Here is my...
2
by: Jerad Rose | last post by:
I have a fairly simple C# console app which copies files from a network folder to a local folder. When the app resides on my local C: drive, it runs just fine. However, when the app resides on a...
23
by: wylbur37 | last post by:
I'm running an Apache server on my own computer (Windows XP Pro). I wrote a simple PHP script (called test3.php) that I'm running by putting the following URL in the address bar of the browser...
2
by: LiveCycle | last post by:
Hi, I'm writing a web service, and, as part of its function, I want it to copy a file from a remote server and place that file on the local web server under another name. However, I always get...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.