Question:
Can I save the file to a network directory using another user account?
Details:
There is a service running under the System account. The service, among other things, is engaged in synchronization with a third-party service from which you need to download files and add them to a network folder.
But System does not have access rights to the network folder.
But the service knows the username / password of the user who has such rights.
(So far, only saving the file to temp and starting copying via Process.Start , but maybe there is something more elegant?)