Scott Hanselman

Updating from early ASP.NET Beta builds to Beta 2

April 22, '05 Comments [2] Posted in ASP.NET
Sponsored By

If you're upgrading some mid-BETA or CTP ASP.NET 2.0 code and you get some cryptic messages like

  • c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\chapter 10 - 8 - csharp\3e344bac\60be3ec8\-sngkrtn.0.cs(265): error CS0115: 'ASP._Default_aspx.FrameworkInitialize()': no suitable method found to override
  • 'ASP._Default_aspx.FrameworkInitialize()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\chapter 10 - 8 - csharp\3e344bac\60be3ec8\-sngkrtn.0.cs 265 
  • 'ASP._Default_aspx.GetTypeHashCode()': no suitable method found to override c:\WINDOWS\Microsoft.NET\Framework\v2.0.50215\Temporary ASP.NET Files\chapter 10 - 8 - csharp\3e344bac\60be3ec8\-sngkrtn.0.cs 272 

You'll need to make a few changes. First, you probably already updated your ASPX Markup.

In your ASPX page:

OLD: <%@ Page Language="C#" CompileWith="Default.aspx.cs" ClassName="Default_aspx" %>
NEW: <%@ Page Language="C#" codefile="Default.aspx.cs" Inherits="Default_aspx" %>

In your ASPX.CS source file:

OLD:     public partial class Default_aspx  
NEW:     public partial class Default_aspx  : Page

No free derivation any more, you have to explictly derive from a class that ulitmately derives from System.Web.UI.Page. It is that derivation that will get ride of the override compiler errors seen above. This who post also applies to pages written in VB.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb
Friday, 22 April 2005 12:21:19 UTC
Thanks Scott, I've been wrestling with this for a couple of hours this morning.
Tuesday, 06 September 2005 14:49:01 UTC

Thanks Scott - still wrestling but at least I've a pointer to the right direction :-)
Comments are closed.

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.