Wednesday, July 30, 2008

ASP.NET Error: No suitable method found to override

If you have received this error "No suitable method found to override" while trying to execute your ASP.NET page, it could be one of the following:

  • You renamed a file, but have mismatching reference tags (i.e. You are calling the correct code file, but you are inheriting a non-existant class)

    • FIX: Check the code file in the source of your ASPX page, where it's pointing, and the name of the inheriting class. Also check your ASPX.CS (or .VB) file to make sure the class name there matches what's being called in the ASPX page.

  • You migrated a Visual Studio 2005 file(s) to Visual Studio 2008 on the .NET Framework 2.0. Your temporary files may be out of sync for .NET.

    • FIX: Go to C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\[Name Of Your Project]\ and remove all the temporary folders and files (note: VS 2008 must be closed in order to do this).

Hope that helps. :)