title: Could not load file or assembly 'System.Web.Razor' or one of its dependencies
body: <p>I used Umbraco 4.11.6 in my website(web application).My website is worked in localhost(tested from Visual studio 2012 and IIS(v7)) but when I run it from internet space I got an error.
  The error was:</p>
  
  <h2>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)</h2>
  
  <blockquote>
    <p>Assembly Load Trace: The following information can be helpful to determine why the assembly 'System.Web.Razor' could not be loaded.</p>
    
    <p><strong>WRN:</strong> Assembly binding logging is turned OFF.
    To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1.
    Note: There is some performance penalty associated with assembly bind failure logging.
    To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog].</p>
  </blockquote>
  
  <p>Stack Trace: </p>
  
  <blockquote>
    <blockquote>
      <p>[FileLoadException: 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)]</p>
    </blockquote>
    
    <p>[FileLoadException: 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)]    System.Reflection.RuntimeAssembly._nLoad(AssemblyName
    fileName, String codeBase, Evidence assemblySecurity, RuntimeAssembly
    locationHint, StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder,
    Boolean throwOnFileNotFound, Boolean forIntrospection, Boolean
    suppressSecurityChecks) +0<br>
    System.Reflection.RuntimeAssembly.InternalLoadAssemblyName(AssemblyName
    assemblyRef, Evidence assemblySecurity, RuntimeAssembly reqAssembly,
    StackCrawlMark&amp; stackMark, IntPtr pPrivHostBinder, Boolean
    throwOnFileNotFound, Boolean forIntrospection, Boolean
    suppressSecurityChecks) +210<br>
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
    Evidence assemblySecurity, StackCrawlMark&amp; stackMark, IntPtr
    pPrivHostBinder, Boolean forIntrospection) +242<br>
    System.Reflection.RuntimeAssembly.InternalLoad(String assemblyString,
    Evidence assemblySecurity, StackCrawlMark&amp; stackMark, Boolean
    forIntrospection) +17    System.Reflection.Assembly.Load(String
    assemblyString) +35<br>
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
    assemblyName, Boolean starDirective) +122</p>
    
    <p>[ConfigurationErrorsException: 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)]<br>
    System.Web.Configuration.CompilationSection.LoadAssemblyHelper(String
    assemblyName, Boolean starDirective) +12761078<br>
    System.Web.Configuration.CompilationSection.LoadAllAssembliesFromAppDomainBinDirectory()
    +503    System.Web.Configuration.AssemblyInfo.get_AssemblyInternal() +142    System.Web.Compilation.BuildManager.GetReferencedAssemblies(CompilationSection
    compConfig) +334<br>
    System.Web.Compilation.BuildManager.CallPreStartInitMethods(String
    preStartInitListPath) +203<br>
    System.Web.Compilation.BuildManager.ExecutePreAppStart() +152<br>
    System.Web.Hosting.HostingEnvironment.Initialize(ApplicationManager
    appManager, IApplicationHost appHost, IConfigMapPathFactory
    configMapPathFactory, HostingEnvironmentParameters hostingParameters,
    PolicyLevel policyLevel, Exception appDomainCreationException) +1151</p>
    
    <p>[HttpException (0x80004005): 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)]<br>
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12881540
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context)
    +159    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest
    wr, HttpContext context) +12722601</p>
    
    <p>Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17929</p>
  </blockquote>
  
  <p>a part of WebConfig:</p>
  
  <pre><code>&lt;runtime&gt;
  &lt;!-- Old asp.net ajax assembly bindings --&gt;
  &lt;assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" /&gt;
      &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" /&gt;
      &lt;bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="4.0.0.0" /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="System.Web.WebPages" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
      &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="System.Web.WebPages.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
      &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="System.Web.Razor" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
      &lt;bindingRedirect oldVersion="0.0.0.0-2.0.0.0" newVersion="2.0.0.0" /&gt;
    &lt;/dependentAssembly&gt;
    &lt;dependentAssembly&gt;
      &lt;assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" /&gt;
      &lt;bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" /&gt;
    &lt;/dependentAssembly&gt;
  &lt;/assemblyBinding&gt;
  </code></pre>
  
  <p></p>