I am trying to deploy my web project and I keep getting this error:
Line 1: <%@ Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication” Langu
In My case the issue was fixed by changing the solution platform from AnyCPU to x86.
I had the same error. It is solved by following steps
Go to IIS -> find your site -> right click on the site -> Manage Website -> Advanced Setting -> Check your physical path is correct or not.
If it is wrong, locate the correct path. This will solve issue.
I had the same error on IIS Express. In my case, I had two projects as startup projects.I changed properties of the solution to single startup project and ran it. then changed it to previous settings and ran the solution again and no error occurred again!
You can change it by editing Globas.asax file (not Global.asax.cs). Find it in app folder in windows explorer then edit
<%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.Global" Language="C#" %>
to
<%@ Application Codebehind="Global.asax.cs" Inherits="YourAppName.MvcApplication" Language="C#" %>
It may occur due to the clean solution.The dlls in the bin will be removed. 1.Clean Solution 2.Rebuild the solution 3.If the build process have failed,not all the necessary dlls will be stored in the bin. This is another scenario where the error occurs
The only solution that worked for me
Other solutions I have tried, which didn't work.
Cleaning/Rebuilding
Cleaning bin, obj folders
Changing namespace