I am trying to view a pdf document from memorystream in a new window.but some error are showing like "Uncaught SyntaxError: Unexpected token %"
here is my code
public ActionResult ViewDocument()
{
byte[] FileArr = fileRepo.GetBlockByte();
MemoryStream pdfStream = new MemoryStream(FileArr);
byte[] byteInfo = pdfStream .ToArray();
pdfStream .Write(byteInfo, 0, byteInfo.Length);
pdfStream .Position = 0;
return new FileStreamResult(pdfStream , "application/pdf");
}
can any one help actually why this error occur?
Thanks in advance