There's a chance you need to move that file out of the /CMSWebParts directory and place it in a more appropriate directory like the /CMSPages directory. There are many directories in which Kentico processes differently so it could be processing that one through the CMS Engine when it should only be processed through the ASP.NET engine.