Json file is corrupt

I have a json file called test.json in the root directory of my site. which is hosted on Windows Server 2012 R2 in IIS version 6.2. json file - 2698 KB. I wrote a small C # console application that accesses a file very simply and then writes an array of bytes to a file.

class Program
{
    static void Main(string[] args)
    {
        WebClient client = new WebClient();
        byte[] data = client.DownloadData("http://mywebsite/test.json");
        File.WriteAllBytes("D:\\test\\download.json", data);
    }
}

When I run this exe on my local computer and then compare the downloaded file with the source file in the root of the site, they are identical. But when I run exe on the server (the same server that hosts the site) and compares the downloaded file with the original, the downloaded file is always damaged and each time in a different place or in a different way. For example:

Original Json:

"Deleted" : false,
"CreateDate" : "2012-09-04T07:57:41.5947956",
"ModUser" : "CFR",

Corrupt Json:

"Language" : null,
"Dell," Lookup ":null," LanguageId ":1,"

. -, . json Internet Explorer, . . , . .

+4
1

. mywebsite hosts - localhost ip 127.0.0.1, , json-, .

+1

Source: https://habr.com/ru/post/1626491/


All Articles