При попытке прочитать составной контент из запроса я получаю исключение, в котором говорится, что контент, возможно, уже был прочитан другим компонентом.
if (MultipartRequestHelper.IsMultipartContentType(Request.ContentType))
{
// Used to accumulate all the form url encoded key value pairs in the
// request.
var formAccumulator = new KeyValueAccumulator();
var boundary = Request.GetMultipartBoundary();
var reader = new MultipartReader(boundary, HttpContext.Request.Body);
var section = await reader.ReadNextSectionAsync();
while (section != null)
{
ContentDispositionHeaderValue contentDisposition;
var hasContentDispositionHeader =
ContentDispositionHeaderValue.TryParse(section.ContentDisposition, out contentDisposition);
}
}
Подробнее здесь: https://stackoverflow.com/questions/498 ... other-comp
Неожиданное завершение потока: возможно, содержимое уже было прочитано другим компонентом. Microsoft.AspNetCore.WebUtili ⇐ C#
-
- Похожие темы
- Ответы
- Просмотры
- Последнее сообщение