I got the following error: \"An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details a
The case is solved, but you may also get this error if your project is building to a different directory than IIS_Virtual_Directory\bin and dlls are missing.
I was learning from a video resource and ran into this error when told to hit Ctrl-F5 in the View in order to load it directly. By doing this, I ran into the same error message you posted.
In order to fix this, I built the solution (Build > Build Solution or Ctrl+Shift+B) and then retried.
After going through all of my projects in my Solution to set the compile to output to bin\debug and bin\release, this problem started for me. I finally realized that the startup project (i.e. the project with global.asax) needed to output to bin only.
As Kevin answered. I was changing the project name and namespacing in my MVC project. When I ran the application I got the same error "Line 1: <% .....".
To fix this, I needed to update the namespace within Global.asax
(Right Click
-> View Markup
) then in the Inherits
attribute update this to "<correct root namespace for MVC project>.MvcApplication
".
simply just copy the project to another location and run it will work i think problem because of the cleaning is not correctly done and there may be setup change in the output /bin
I use FTP
to upload DLL
s of my site on the server but sometimes this error happen when the main DLL
of the website has not been uploaded correctly on the server.
So I recommend you to rebuild you project and re-upload main DLL
s on the server again.