I'm trying to generate a PDF with the Rotary, I usually get it in the Location, but when I publish it it displays error 404.
I have already added the DLLs in the project.
public IActionResult ConfirmaReimpressaoCertificadoPDF(Certidao certificado)
{
var usuarioBase = certificadoRepository.GetCertificado(certificado.RG);
if (usuarioBase == null)
{
}
return new ViewAsPdf("ConfirmaReimpressaoCertificadoPDF", usuarioBase)
{
FileName = "Certidao.pdf"
};
}
The StartUp:
RotativaConfiguration.Setup(env, "..\wwwroot\Rotativa\");
Exit a Warn and a LOG ERROR:
warn: Microsoft.AspNetCore.HttpsPolicy.HttpsRedirectionMiddleware [3] Failed to determine the https port for redirect.
fail: Microsoft.AspNetCore.Diagnostics.ExceptionHandlerMiddleware [1] An unhandled exception has occurred while executing the request. System.Exception at Rotativa.AspNetCore.WkhtmlDriver.Convert (String wkhtmlPath, String switches, String html, String wkhtmlExe) at Rotativa.AspNetCore.WkhtmltopdfDriver.ConvertHtml (String wkhtmltopdfPath, String switches, String html)