0

Disclaimer: I know there are other questions like this but all seems to be very old and I don't know if this is a new issue in Azure.

I have a small C# MVC web app that list some laboratory test result and let the user download the result as a PDF. I've always used Rotativa for this kind of stuffs, and never encountered a problem.

The feature works like a charm in localhost, but when I deploy to my Web App in Azure it wont load and the server times out. I've tried everything and wont work, I installed Rotativa has a Nuget in my project version 1.7.3.

And this is how I'm creating the pdf:

public ActionResult Pdf()
{
     var file = new Rotativa.ViewAsPdf("~/Views/CovidTest/TestViewForPDF.cshtml", null) { FileName = "Test.pdf", PageSize = Rotativa.Options.Size.A4, CustomSwitches = "--disable-smart-shrinking" };         
        
     return file;
}

This is the first time I'm having this issue in Azure. I don't know if there is something I'm missing in the Web App configuration.

Guillermo Oramas R.
  • 1,303
  • 2
  • 14
  • 31

1 Answers1

1

I found the solution for me in this answer.

My testing App Service was using the D1 Shared plan. As soon as I scaled it up to a production plan - e.g. S1 - it worked.

AGB
  • 2,378
  • 21
  • 37