Was there an answer to this? I have a web service running in azure AKS behind azure agic. Locally it works fine. I am sending data over a websocket connection:
await this.WebSocket.SendAsync(msgbuf, WebSocketMessageType.Text, endOfMessage: true, CancellationToken.None);
However, deployed in AKS I get this error:
System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake.
9/9/2022, 3:54:47 PM
engageapiapp-69858df8dc-kmd7c
798d7d41e13331a3d47c036600ea0a0429ce6993acd7c0f8e601339ed3f83306
---> System.InvalidOperationException: Response Content-Length mismatch: too many bytes written (83 of 0).
9/9/2022, 3:54:47 PM
engageapiapp-69858df8dc-kmd7c
798d7d41e13331a3d47c036600ea0a0429ce6993acd7c0f8e601339ed3f83306
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.VerifyAndUpdateWrite(Int32 count)
9/9/2022, 3:54:47 PM
engageapiapp-69858df8dc-kmd7c
798d7d41e13331a3d47c036600ea0a0429ce6993acd7c0f8e601339ed3f83306
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.WritePipeAsync(ReadOnlyMemory1 data, CancellationToken cancellationToken) 9/9/2022, 3:54:47 PM engageapiapp-69858df8dc-kmd7c 798d7d41e13331a3d47c036600ea0a0429ce6993acd7c0f8e601339ed3f83306 at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpResponseStream.WriteAsync(ReadOnlyMemory
1 source, CancellationToken cancellationToken)
9/9/2022, 3:54:47 PM
engageapiapp-69858df8dc-kmd7c
798d7d41e13331a3d47c036600ea0a0429ce6993acd7c0f8e601339ed3f83306
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpUpgradeStream.WriteAsync(ReadOnlyMemory1 source, CancellationToken cancellationToken) 9/9/2022, 3:54:47 PM engageapiapp-69858df8dc-kmd7c 798d7d41e13331a3d47c036600ea0a0429ce6993acd7c0f8e601339ed3f83306 at System.Net.WebSockets.ManagedWebSocket.SendFrameLockAcquiredNonCancelableAsync(MessageOpcode opcode, Boolean endOfMessage, Boolean disableCompression, ReadOnlyMemory
1 payloadBuffer)