I have a wpf application (C#) that needs to copy a file to a server that is not part of a domain. FTP cannot be used. I looked into using LogonUser() within advapi32.dll but could impersonate the local user to the machine successfully. Are there any other options?
A:
One is to open the security on the machine you are copying to, such that none authenticated users are aloowed to write to disk.
Another is to create a local user on the machine that you are writing to , that has the same name and password as the domain account making the call. This works in some situations.
Shiraz Bhaiji
2009-06-30 11:34:09
The first is not an option, i have tried the second but the user fails to login, even though user and password are the same, shame!
Danny
2009-06-30 11:47:54
+1
A:
Hi...one option is there to upload file through WCF Service..in that case it is not required that it should be in same domain.
Here article's title is large file upload / download but it is meant only for small files upto [10 MB - 40 MB].
Harryboy
2009-06-30 12:08:08
A:
I was able to impersonate the local user by setting logonProvider to 0 and logonType to 9 using advapi32.dll.
Danny
2009-07-01 12:22:07