Failed to load MvcApplication type on Global.asax

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

"Could not load type Mynamespace.MvcApplication" 

and it shows that the problem is related to Global.asax:

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

My project works fine on my computer. I tried just downloading Global.asax and the rest, but got an error. I also downloaded Global.asax.cs, but the problem persists.

If my application compiles completely and works fine on my computer, why does it complain about it? What am I missing?

+6
source share
2 answers

I ran into this problem, it was fixed when I rebuilt the MVC project on the server.

+3
source

I worked with IIS Express and tried many solutions, but none of them worked, after 2 days I found 1 possible solution:

  1. Copy the dll from the output folder of the release, especially [project name] .dll
  2. Paste in the debug output folder and run.
0
source

Source: https://habr.com/ru/post/916307/


All Articles