Parser Error Message: Could not load type 'webmarketing'

I had same problem before i just change CodeBehind to CodeFile and it worked.I remember it works in local but i had this problem after uploading.


This is normally happening when you copy files from a Web application projects to Website Project.

When you create a Web Application the Page directive is CodeBehind for the web pages. enter image description here

If you create your application as Website then the Page directive is CodeFile enter image description here

So if you copy from a Web application to Website the Namespace as well as the page directive will not change automatically, you should do this manually to rectify this error.


I had this error message. The problem was my .cs and aspx files were not added to the project. They were in the folder, but were not added. I solved it by adding them to the project (right click, Add). And then after I built the project, it was compiled into a dll in the bin folder. There was no need to change the text from CodeBehind to CodeFile.


what i did to solve my problem giving the same message was to go to IIS and check if it is configured as an Application or simply as a virtual directory. The App icon was just a folder icon. So i right clicked it and Manage Virtual directory > Advanced Settings > convert to Application changed the icon of virtual directory to a green earth icon. Of course the app was targeting framework 4.5, so changed App pool to 4.0 from default app pool, which was there earlier. This solved the issue for me.

But some things i did not say, 1. I am running it locally on IIS 6.1. 2. I am accessing with domain credential and not with 'pass through' authentication. Hope this helps