简体   繁体   中英

Create Session in Remote Computer

I am trying to download a file to remote computer with FileStream. When i come to FileStream line there is an error occurs like "The user name or password is incorrect.". How can I create session or connect remote pc in C#? If dll is required, can you share it?

Many Thanks

In order to be able to access a remote file location, your process has to be authorized to access that remote resource. Normally the process wil run with the credentials of the user launching it, but you can change the credentials from your code (eg to use a service account) by means of the WindowsIdentity.Impersonate method.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM