Hi,
I have this weird error coming from ServiceStack.ServiceStackHost and not sure how to solve it.
When I run my .net 6 console api app and it displays the api surface in any web browser (tested it on edge and chrome) then all displays well. ( https://localhost/metadata) When I hit refresh in the browser (with very fast iteration of refresh button) then I eventually hit the following error.
ServiceStack.ServiceStackHost: Error: Cannot write to the response body, the response has completed.
Object name: ‘HttpResponseStream’.
System.ObjectDisposedException: Cannot write to the response body, the response has completed.
Object name: ‘HttpResponseStream’.
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponsePipeWriter.g__ThrowObjectDisposedException|15_0()
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.WriteAsync(ReadOnlyMemory1 source, CancellationToken cancellationToken) at Microsoft.AspNetCore.Watch.BrowserRefresh.WebSocketScriptInjection.TryInjectLiveReloadScriptAsync(Stream baseStream, ReadOnlyMemory
1 buffer, CancellationToken cancellationToken)
at Microsoft.AspNetCore.Watch.BrowserRefresh.ResponseStreamWrapper.WriteAsync(ReadOnlyMemory`1 buffer, CancellationToken cancellationToken)
I tried to replicate this in a smaller repo but not having any success yet.
Any pointers on how to solve this would be much appreciated.