FileStreamResult throw an exception:
InvalidOperationException: Response Content-Length mismatch
solution:
Stream must seek begin
Pseudo-code as follows:
Stream ms = new MemoryStream(); book.Write(ms); ms.Seek(0, SeekOrigin.Begin); //seek begin return ms;