Microsoft Edge has problem to show a PDF-file from a ASP.Net MVC application. Bug?

Not reproducible Issue #14094278

Details

Author
Oscar A.
Created
Oct 5, 2017
Privacy
This issue is public.
Found in
  • Microsoft Edge
Found in build #
15.15063
Reports
Reported by 1 person

Sign in to watch or report this issue.

Steps to reproduce

I dont know if this is a bug in Microsoft Edge. Doesent work in Microsoft Edge 40.15063.0.0, Microsoft EdgeHTML 15.15063 but in other webbrowsers.

I hope someone have a answer to this problem.

I have a ASP.Net MVC application with a action in a controller that send a PDF-file as a byte array back to the webbrowser. I want this pdf-file to be opened in a new tab in the webbrowser. I dont send it back with a file name. Only the byte array and contenttype = “application/pdf”

My solution works for firefox, chrome and internet explorer 11. Microsoft edge call the controller action 5 times before it show the pdf-file in a new tab. Every time the controller action returns the correct byte data.
The other webbrowser only call the controller action 1 time before showing the pdf-file in a new tab.

The controller and action loks like this
public class PdfViewController : Controller {
[HttpGet]
public ActionResult GetPdf(int? pdfId, String TypeOfKungorelse)
{
     if(pdfId:HasValue)
     {
     // Get my pdf from a webservice. This works
     // fileData is the pdf-file as byte[], array from a database.
     // I have tried to return File(fileData, “application/pdf”) to. Same problem
     FileContentResult fcr = new FileContentResult(fileData, “application/pdf”);
          return fcr;
     }// End of if
     // If no pdfId i go to home page
    return RedirectToAction("Index", “Home”);
}// End of action
}// End of controller

I hope for a answer to this problem. Is this a bug in Microsoft edge?

Attachments

0 attachments

    Comments and activity

    • Microsoft Edge Team

      Changed Assigned To to “Steven K.”

    • Hi Oscar,

      Can you provide a simplified repro for this?

      Appreciate the help,

      Steve

    • Microsoft Edge Team

      Changed Status to “Not reproducible”

    • Thanks for filing this bug! Unfortunately, in its current state, this issue is not actionable. If you can provide a simplified repro (as requested below), that would be awesome! Or, if you’re still running into this but aren’t able to reduce it further, please use the Feedback Hub application to file feedback. We’ll make sure it gets moved to the correct folks. Thanks again!

    You need to sign in to your Microsoft account to add a comment.

    Sign in