I have an mvc 3 web application, but my joint web hosting company only supports MVC 2. So I also deploy mvc 3 related dll files and it worked well on the server until it was a mvc beta 3.
Yesterday I upgraded my pc environment to mvc 3 RC and rebuilt my web application. The application works well on my local computer, but when I deploy and run on the hosting server, it makes an error.
[MissingMethodException: Method not found: 'Void System.Web.Mvc.GlobalFilterCollection.Add(System.Object)'.]
Myweb.MvcApplication.RegisterGlobalFilters(GlobalFilterCollection filters) in c:\my\Global.asax.cs:18
Myweb.MvcApplication.Application_Start() in c:\my\Global.asax.cs:36
As you can see, when I try to register a global filter in global.asax, it says that it cannot find the Mvc.GlobalFilterCollection.Add (object) method.
If I do not register any global filter, the entire web server works well on the hosting server.
How can I solve this error?
edit: It seems that the mvc3 beta is registered in the GAC of the hosting server. They said no, but I checked the location of the System.Web.Mvc.dll reference in my application.
source
share