Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have integrated MVC (using Areas concept) into an existing web forms project to generate reports as pdf document using Rotativa component. Project framework is set to 4.5.1.

On testing at dev and staging environments it works fine but it fails at prod. On prod, it throws the below error:

Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Rotativa Version: 1.6.4
System.Web.Mvc Version: 5.2.3.0


I have given the binding redirect in web.config as below.
bindingRedirect oldVersion="0.0.0.0-5.2.3.0" newVersion="5.2.3.0"

Experts please advise.

What I have tried:

Tested the code in dev, uat, worked fine. Added binding redirect to use latest mvc dll, still throws error.
Deployed a test project having web forms and mvc areas in similar way to prod environment and it worked correctly but actual application code fails.
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900