简体   繁体   English

Rotativa 在本地工作正常,但无法重定向服务器中的视图

[英]Rotativa locally works fine but it's unable to redirect the view in the server

Rotativa locally works fine but it's unable to redirect to the desired view to print in the server Rotativa 在本地工作正常,但无法重定向到所需的视图以在服务器中打印

enter image description here在此处输入图片说明

Few things to check here:这里需要检查的几件事:

  1. Rotativa uses wkhtmltopdf, check if it is installed on server. Rotativa 使用 wkhtmltopdf,检查它是否安装在服务器上。
  2. you can just copy the 2 following dll files to the Rotativa folder (in root location of project) on the server if you don't want to / can't easily install things on the server, ie, msvcr120.dll and msvcp120.dll如果您不想/无法轻松在服务器上安装东西,您可以将以下 2 个 dll 文件复制到服务器上的 Rotativa 文件夹(在项目的根位置),即 msvcr120.dll 和 msvcp120.dll

Check similar question/answers here在此处检查类似的问题/答案

https://stackoverflow.com/a/50066692/3559462 https://stackoverflow.com/a/50066692/3559462

https://stackoverflow.com/a/36877635/3559462 https://stackoverflow.com/a/36877635/3559462

https://stackoverflow.com/a/27942678/3559462 https://stackoverflow.com/a/27942678/3559462

(razor to pdf using rotativa or itextsharp): https://qawithexperts.com/article/asp.net/export-html-to-pdf-in-aspnet-mvc-using-itextsharp-or-rotativ/94 (使用 rotativa 或 itextsharp 剃刀到 pdf): https ://qawithexperts.com/article/asp.net/export-html-to-pdf-in-aspnet-mvc-using-itextsharp-or-rotativ/94

I recommend you add "Rotativa" folder in the root of your application and add these files我建议您在应用程序的根目录中添加“Rotativa”文件夹并添加这些文件

help-wkhtmltoimage.txt
help-wkhtmltopdf.txt
msvcp120.dll
msvcp140.dll
msvcr120.dll
vcruntime140.dll
wkhtmltoimage.exe
wkhtmltopdf.exe
wkhtmltox.dll

As suggested here https://stackoverflow.com/a/48711643/3559462正如这里所建议的https://stackoverflow.com/a/48711643/3559462

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Rotativa.Netcore 在本地工作,但在部署后不工作 - Rotativa.Netcore works locally but not after deployment TLS在服务器盒中失败,但在本地工作正常 - TLS fails in server box but works fine locally 更新查询在本地工作正常,但在远程服务器上不行 - Update Query works fine locally but not on Remote server Rotativa pdf 转换器在服务器上运行速度非常慢 - Rotativa pdf converter works very slow on server 暂存服务器上不可访问DataCache构造函数; 在本地工作正常 - DataCache constructor not accessible on staging server; works fine locally ASPX在本地工作,但不能在服务器上工作 - ASPX works locally but not on server HttpCookie在本地工作,但不在服务器上 - HttpCookie works locally but not on server Google Map Direction Api在本地工作正常,但在服务器上部署后无法正常工作 - Google Map Direction Api Works Fine Locally but does not work properly when deployed on Server asp:button在本地工作,但在服务器上不工作 - asp:button works locally but no on server 发送邮件可以在本地工作,但不能在服务器上工作吗? - Send mail works locally but not on server?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM