简体   繁体   中英

easiest and/or safest way(s) to save a file to a backup server by code and how?

Full edit:

The scenario is that after uploading the file to the server via a secured web service, I'd like to save/create a copy of that file to another server in a LAN or another network.

I'd like to know what possible ways I could use to programmatically copy/create the backup of the file uploaded to the backup server (saving the file to the database would be the last option probably).

Here are a few details:

  • Files are of different types and sizes mostly text, documents and images that would be around a few KB to a couple of MB's.

  • Database is SQL Server 2008 R2 and the only way to connect to it is via calls to a secured WCF service.

  • Servers can be in the same LAN or on separate networks (depends on the client requesting).

  • The 2nd server is a redundant server and is using the 1st one as it's backup and vice versa.

Took me a while to find this post. Just map the drive to the backup server's shared folder and implement WindowsImpersonationContext.

How to Impersonate a user in managed code?

haven't seen security problems on this and doesn't need to mess with the HTTP/certificates.

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