Skip to content

Reading is not allowed after reader was completed #34034

@shenglingshi

Description

@shenglingshi

I host aspnet core 5 in iis10, and run Hosting environment is Production.
but sometimes post request is error.
my all action is async task.

Exception :
System.InvalidOperationException: Reading is not allowed after reader was completed.
at System.IO.Pipelines.ThrowHelper.ThrowInvalidOperationException_NoReadingAllowed()
at System.IO.Pipelines.Pipe.AdvanceReader(System.SequencePosition& consumed, System.SequencePosition& examined) at offset 13
at System.IO.Pipelines.Pipe.DefaultPipeReader.AdvanceTo(System.SequencePosition consumed, System.SequencePosition examined)
at Microsoft.AspNetCore.Server.IIS.Core.IISHttpContext.d__365.MoveNext() at offset 249
at System.Runtime.CompilerServices.ValueTaskAwaiter1.GetResult() at Microsoft.AspNetCore.Server.IIS.Core.HttpRequestStream.<ReadAsyncInternal>d__10.MoveNext() at offset 122 at System.Runtime.CompilerServices.ValueTaskAwaiter1.GetResult()
at Microsoft.AspNetCore.WebUtilities.FileBufferingReadStream.d__38.MoveNext() at offset 301
at Microsoft.AspNetCore.WebUtilities.StreamHelperExtensions.d__3.MoveNext() at offset 173
at Microsoft.AspNetCore.Mvc.Formatters.NewtonsoftJsonInputFormatter.d__12.MoveNext() at offset 304
at Microsoft.AspNetCore.Mvc.ModelBinding.Binders.BodyModelBinder.d__11.MoveNext() at offset 518

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-networkingIncludes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractionsfeature-iisIncludes: IIS, ANCM

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions