F
F
foxlye2019-03-15 19:54:31
C++ / C#
foxlye, 2019-03-15 19:54:31

When downloading a file from the server, it turns out to be empty, why?

Welcome all!
I have this code:

WebClient wc = new WebClient();
            string url = "link.domain/ver.txt";
            string save_path = fpath;
            string name = "ver.txt";
            MessageBox.Show(save_path);
            wc.DownloadFile(url, save_path + name);

Everything seems to be working, but the fact is that on the server the txt file contains information, and the downloaded file is empty.
Downloaded file:
5c8bd8b09e16e394182941.png
File on the server:
5c8bd8c374d9c877906029.png
Downloading the line will not work, because it requires JavaScript to be enabled.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
LiptonOlolo, 2019-03-15
@LiptonOlolo

Download a string and write it to a file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question