我试图在http请求流中写一个巨大的字节数组 这是我的代码:
ASCIIEncoding encoding = new ASCIIEncoding();
byte[] bytes = encoding.GetBytes(body);
request.ContentType = contentType;
request.ContentLength = bytes.Length;
Stream stream = request.GetRequestStream();
stream.Write(bytes, 0, bytes.Length);
stream.Close();
它适用于小文件,但是当我尝试ti写字节数组[9264619]时,我收到了一个中止错误。 有什么建议吗?