Posted on: 9/5/2013 8:37:44 AM | Views : 3104

I'm trying to display some dynamically created charts in my MVC5 application using Visual Studio 2013 Preview and am doing this using the following call in my view:
<img src="@Html.Action("ResultsImage", new { MainGroupID = 1 })" /> This gives the error 'OutputStream is not available when a custom TextWriter is used'.
I have tried several ways of returning a FileContentResult with no joy. So, I put a break immediatly inside the Action method:
// GET: /WoundAudit/ResultsImage/3 public ActionResult ResultsImage(Int32 MainGroupID) { ..and before I try to do anything I see that the Response objects OutputStream has already thrown the exception! Response.Output is a System.IO.StringWriter - is this a custom TextWriter?
Any help gratefully appreciated.
Steve
...

Go to the complete details ...