could not load type MvcApplication on Global.asax

Lord of Scripts picture Lord of Scripts · May 22, 2012 · Viewed 11.1k times · Source

I copied my MVC3 Razor website using FTP. However, when I type the URL I get an error:

"Could not load type Mynamespace.MvcApplication"

and it shows the problem is with Global.asax:

 Line 1:  <%@ Application Codebehind="Global.asax.cs" Inherits="MvcPanamaVibes.MvcApplication" Language="C#" %>

My project runs fine on my computer. I tried by only uploading Global.asax and the rest but got the error. I uploaded Global.asax.cs as well but the problem persists.

If my application is fully compiled and runs fine on my computer, why is it complaining about this? what am I missing?

Answer

Occidio picture Occidio · Jul 31, 2012

I encountered this problem, it was fixed when I rebuilt my MVC project on the server.