Cannot write to a closed TextWriter

I keep finding this exception in my logs in multiple Litium projects:

System.ObjectDisposedException: Cannot write to a closed TextWriter.
at System.IO.__Error.WriterClosed()
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at Litium.Web.Products.PriceAgents.PriceAgentHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext context)

Am I doing something wrong or is this a bug?

Litium version: 7.2.3

It’s not a know bug, do you have any replication steps that we can use to replicate the issue?

Regarding to the code I can see two scenarios when this can happen:

  1. If the price agent is closing the stream inside the render method.
  2. If the client disconnects from server during processing.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.