Reputation: 2821
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?
Upvotes: 1
Views: 244
Reputation: 2821
I was able to impersonate the local user by setting logonProvider to 0 and logonType to 9 using advapi32.dll.
Upvotes: 0
Reputation: 1114
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].
Upvotes: 1
Reputation: 65391
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.
Upvotes: 0