Solución al error:
writer.AutoFlush = false;
writer.Write("POST xml.xml HTTP/1.1");
writer.Write("\r\n");
writer.Write("Content-Type: application/xml");
writer.Write("\r\n");
writer.Write("Content-Length: ");
writer.Write(encoding.GetBytes(message).Length);
writer.Write("\r\n");
writer.Write("\r\n");
writer.Write(message);
writer.Write("\r\n");
writer.Write("\r\n");
writer.Flush();
StreamReader reader = new StreamReader(stream, encoding);
while (reader.Peek() >= 0)
{
response += reader.ReadLine();
}
Saludos.