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=126.96.36.199, 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-188.8.131.52" newVersion="184.108.40.206" /> </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