I have a simple C# apllication that is transfering files from one machine to another. PC's are connected via VPN. Copy(path1,path2) function works very slow - about 1% of bandwidth. What can be the reason ?
I'd be very greatful for any help
there are alot of variables: 1. network 2. vpn 3. file size
start with these simple tests.
1. transfering an empty text file from 1 directory to another on your local box.
2. then preform the same test with a larger file (similiar in size the actual file you want to copy.)
*repeat steps 1 and 2 with your local machine and another machine on the network (not over vpn).
*repeat steps 1 and 2 to a computer over vpn.
i created a copy routine which transfers sql backs from the server to a usb drive. it takes about 30 minutes to transfer everything.
another stragety is to stream parts of the file and save them. I believe Copy.File() loads the entire file into memory, then transfers. streaming bytes would begine coping the file before the entire file is loaded. haven't tried this, but it makes sense in theory.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.