1

I have Sitefinity website created in my local machine working fine. But when I uploaded it in the server, I got this error:

Could not load file or assembly 'System.Web.Razor, Version=2.0.0.0, 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)

I have the Sytem.Web.Razor in bin folder, and changed the binding redirect newer version to 2.0.0 but then i get the error below.

Could not load file or assembly 'System.Web.Razor' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Carl Michaels
  • 125
  • 1
  • 3
  • 12
  • possible duplicate of [Could not load file or assembly 'System.Web.Razor' or one of its dependencies](http://stackoverflow.com/questions/15874366/could-not-load-file-or-assembly-system-web-razor-or-one-of-its-dependencies) – Stefan Nov 25 '13 at 10:13

1 Answers1

0

I think you'll need to install MVC to you web-server.

Check out:

Could not load file or assembly 'System.Web.Razor' or one of its dependencies

Community
  • 1
  • 1
Stefan
  • 17,448
  • 11
  • 60
  • 79
  • Thanks for your response. Unfortunately, I dont have the privileges to install the razor dlls in the GAC, and i already set dlls to copy to local on build. Is there anyway that i can do it only in my solution? And also I dont get the error when I publish it first but the problem is it wont load my existing pages. – Carl Michaels Nov 25 '13 at 10:22
  • Hmm, that makes it more complex. I think IIS will require some of the DLL's to work properly with MVC. If it does, i am not sure if you'll get it running, as for IIS tries to compile your pages. You might consider to deploy a pre-compiled version. See http://stackoverflow.com/questions/4608579/what-is-the-correct-way-to-precompile-an-asp-net-mvc-2-application for details. And make sure you set all the references in your project to `Copy Local`. I am not sure it will be enough though. – Stefan Nov 25 '13 at 10:40
  • I requested to access the GAC folder, I copy and replace the System.Web.Razor and System.Web.Mvc dlls inside my project then build and publish and it works perfectly. Thanks alot Stefan! – Carl Michaels Nov 26 '13 at 06:51