so what I'm trying to do is to list information such as the names of files according to a folder path given by the user. And as it is possible to target a file server which is in a different domain, you would need to use a different user.
I use Directory.GetFiles(path)
to get the files. So is there a simple or not too hard way to accomplish that?
P.S. I do all that in a simple c# console application.
[Edit]
All I could find is this: Getting the Current username when impersonated