Is it possible that you haven't set the folder as an application in IIS (or your web server)? If not, then the App_Code that gets used is that from the parent folder (or the next application upwards).
Ensure that the folder is marked as an application, and uses the correct version of ASP.NET.