I had this error come up on a few pages after I deployed my website and it was driving me crazy. After hours of debugging, it turns out to be a simple problem. The problem is that I had duplicate page/user control names which when deployed was causing a naming conflict. This happens if for example I have a folder name members and a page name “myprofile.aspx” this creates a class named members_myprofil. Then if I have another user control under usercontrols\members\myprofile.ascx then its class also is name members_profile.
By default asp.net pages are compiled into multiple DLLs (one per folder, I think) and the only way I discovered this error is when I used the Web Deployment Project and tried to get it to merge the DLLs into a single DLL (as in asp.net 1/1.1). Initially, the build failed with the error: “aspnet_merge.exe” exited with code 1, which wasn’t very helpful. After some research, I found this link http://geekswithblogs.net/michelotti/archive/2006/07/31/86754.aspx which tells you how to show more informative aspnet_merge errors. By looking in the build output window, I was able to find the offending classes/pages and fix/rename them.
I hope this helps.