Здравствуйте, Kluge, Вы писали:
K>Hi многоуважаемый All!
K>Есть задача отправить на сервер текст(много) и получить в ответ другой.
K>Файлик отправляю через WebRequest.
А если так:
static void Main(string[] args)
{
HttpWebRequest request = (HttpWebRequest) WebRequest.Create("
http://localhost");
request.Method = "POST";
string r = "sssssssssss";
byte[] data = Encoding.ASCII.GetBytes(r);
request.ContentLength = data.Length;
request.GetRequestStream().Write(data, 0, data.Length);
try
{
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
Console.WriteLine("Response Finished");
}