U
ultra
Я юзал следующий код:
но постоянно вылезает исключение :
Код:
using System;
using System.Net;
using System.IO;
namespace Net_App
{
class WebClientExample
{
public static void Main()
{
WebClient user = new WebClient();
string uri = "http://www.mail.ru";
string fname = "data.txt";
try
{
Console.WriteLine("Загрузка данных с узла \t" + uri + "\t в файл" + fname);
user.DownloadFile(uri, fname);
}
catch (WebException exc)
{
Console.WriteLine(exc);
}
catch (UriFormatException exc)
{
Console.WriteLine(exc);
}
Console.WriteLine("Всё скачано!");
}
}
}
но постоянно вылезает исключение :
The server committed a protocol violation. Section=ResponseHeader Detail CR must be followed by LF