Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Elmah.MVC issue

前端 未结 6 1367
[愿得一人]
[愿得一人] 2020-12-23 16:52

Locally - my MVC 4, asp.net, c# app runs fine on IIS 8 / Windows 8.

When deployed to Windows Server 2008, I get this error:

Could not load file or as         


        
6条回答
  •  不知归路
    2020-12-23 17:40

    I had this exact same issue using MVC4 with Ninject built for .Net 4.5

    To fix this i had to add a binding redirect to my Web.config file: (at the end of the file, just before the tag)

      
        
          
            
            
          
          
            
            
          
          
            
            
          
      
        
        
      
        
      
    

    This forces the web server to use System.Web.Mvc 4.0.0.0 instead of an older version.

提交回复
热议问题