1
votes

Source Error:
Parser Error Message: Could not load type 'MyProject.MvcApplication'.

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

I have implemented all solution provided on below links and many more, but I'm not able to fix this issue. Is this related to the IDE? If so, I will open this app in something other than VS2019, then this issue would not occur.

IIs Error: Application Codebehind=“Global.asax.cs” Inherits=“nadeem.MvcApplication”

https://social.msdn.microsoft.com/Forums/windows/en-US/7ad2acb0-42ca-4ee8-9161-681689b60dda/bin-folder-location-causes-quotparser-error-message-could-not-load-typequot-problem?forum=winformssetup

https://www.c-sharpcorner.com/forums/i-am-facing-problem-during-build-my-asp-net-mvc-application

1
Is this at compile-time or run-time?mxmissile
Its run time issuesVikrant

1 Answers

0
votes

To resolve the issue you could try below workaround:

1)Delete all files from the bin folder of the project. Right-click on the project and click clean and build.

2)Check your global.asax and global.asax.cs are correctly formated.

3)try to remove the site from the iis and recreate it by your self.

If the above way is not working then I suggested you to restart the application OR remove the temporary files in the computer by Run command temp and %temp% OR include the obj folder in to the project and rebuild and run.

Refer this below link for more detail: