Error converting MVC4 view to PDF with Rotativa or RazorPDF

前端 未结 1 1406
我在风中等你
我在风中等你 2020-12-21 23:10

I am trying to convert a MVC4 view to Pdf. after a few minutes searching I found

https://www.nuget.org/packages/Rotativa/

and

https://www.nuget.or

相关标签:
1条回答
  • 2020-12-21 23:52

    I had the same problem with asp.net mvc 4 and Rotativa. Adding a binding redirect for System.Web.Mvc in my web.config solve the problem for me.

    <runtime>
        <dependentAssembly>
           <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
               <bindingRedirect oldVersion="1.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
               </dependentAssembly>
        </assemblyBinding>
    </runtime>
    
    0 讨论(0)
提交回复
热议问题