该程序被组策略阻止。有关更多信息,请与系统管理员联系 [英] This program is blocked by group policy. for more information, contact your system administrator
本文介绍了该程序被组策略阻止。有关更多信息,请与系统管理员联系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用rotativa将视图转换为PDF,它可以在localhost上运行,但在服务器上我遇到了错误。请告诉我解决方案。
我尝试过:
public ActionResult GeneratePDF()
{
>
返回新的Rotativa.ViewAsPdf(PDF);
}
解决方案
在web.config中执行以下更改看它是否有效
< system.web >
compilation debug =truetargetFramework =4.5.2/>
< httpruntime < span class =code-attribute> targetframework = 4.5.2 / >
< trust 级别 = 完整 / > <! - 只需将其添加到webconfig - >
< /system.web>
< system.codedom >
<! - 所有在2个代码之间删除 - >
< / system.codedom > 跨度>
I am using rotativa to convert view to PDF ,it work on localhost but on server i am getting above error.please tell me solution.
What I have tried:
public ActionResult GeneratePDF()
{
return new Rotativa.ViewAsPdf("PDF");
}
解决方案
do following changes in web.config and see if it works
<system.web> compilation debug="true" targetFramework="4.5.2"/> <httpruntime targetframework="4.5.2" /> <trust level="Full" /> <!-- Just add this to the webconfig --> </system.web> <system.codedom> <!-- All is removed between the 2 tags--> </system.codedom>
这篇关于该程序被组策略阻止。有关更多信息,请与系统管理员联系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文