I have a weird one. I'm working with an ASP.NET 4.0, mostly MVC 4, but with one Webforms page that holds a report viewer. It works fine on my local machine, however I get a strange behavior on the staging server.
On the first load it crashes with:
Could not load file or assembly 'System.Core, Version=220.127.116.11, Culture=neutral, PublicKeyToken=7cec85d7bea7798e, Retargetable=Yes' or one of its dependencies. The given assembly name or codebase was invalid. (Exception from HRESULT: 0x80131047)
However, the second time it works (at least for a while). I did set up a BindingRedirect:
<dependentAssembly> <assemblyIdentity name="System.Core" publicKeyToken="7cec85d7bea7798e" /> <bindingRedirect oldVersion="0.0.0.0-18.104.22.168" newVersion="22.214.171.124" /> </dependentAssembly>
but again, it only works after crashing first. Also, it appears to be crashing at the required ScriptManager tag, but I don't know if that's a red herring or not since I'm pretty sure it's the ReportViewer that's referencing .NET 2.
User contributions licensed under CC BY-SA 3.0