简体   繁体   中英

How to access files on a different domain in C#

I need a way to acccess files on a fileshare from a different domain from my own? for example, I have here is an application that exists on a sever in Domain1 and this application needs to retrieve files from a server on Domain2.

Any ideas...

Does this help you in the right direction? I assume it's what your asking...

Map a Network Drive From Code for Cross-Domain File Copy.

The CodeProject link given on the site also gives the source code for downloading.

I recently had a similar issue and executing

net use \\machine.otherdomain myusername /USER:password

as part of the user's network logon was a solution for us. This is obviously not perfect but for our environment it was sufficient.

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