What am I missing?

Last post 06-11-2009 6:11 PM by damole. 5 replies.

Sort Posts:

  • What am I missing?

    05-01-2008, 9:44 PM
    • Member
      506 point Member
    • dkirk
    • Member since 12-23-2007, 3:57 PM
    • Charlotte, NC
    • Posts 285

    ok gang, I am almost ready to give up on the BeerHouse book... I have started from the beginning 3 times now and I cannot clear the errors that the code produces. I have downloaded the sample site and everything works fine but when I try to create the site with the book, something is missing. I have tried with both VS2005 Standard and VWD2008 Express and I run in to the same problem. I am just in the beginning and I am trying to run the project to try and switch between the two themes. Below is the Compilation error that I receive:

    Compiler Error Message: The compiler failed with error code 1.



    C:\Program Files\Microsoft Visual Studio 8\Common7\IDE> "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe" /t:library /utf8output /R:"C:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll" /R:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Code.un-b_7ja.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Web.Services\2.0.0.0__b03f5f7f11d50a3a\System.Web.Services.dll" /R:"C:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll" /R:"C:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll" /out:"C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.dll" /D:DEBUG /debug+ /optimize- /w:4 /nowarn:1659;1699;1701  "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.0.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.1.cs" "C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\mybeerhouse\e824566a\410448d7\App_Web_themeselector.ascx.cc671b29.akvlsqza.2.cs"
    
    
    Microsoft (R) Visual C# 2005 Compiler version 8.00.50727.1433
    for Microsoft (R) Windows (R) 2005 Framework version 2.0.50727
    Copyright (C) Microsoft Corporation 2001-2005. All rights reserved.
    
    c:\WebDocs\myBeerHouse\Controls\ThemeSelector.ascx.cs(912305,33): error CS0115: 'ASP.controls_themeselector_ascx.FrameworkInitialize()': no suitable method found to override
    

    function OnToggleTOCLevel1(level2ID) { var elemLevel2 = document.getElementById(level2ID); if (elemLevel2.style.display == 'none') { elemLevel2.style.display = ''; } else { elemLevel2.style.display = 'none'; } }


    Version Information: Microsoft .NET Framework Version:2.0.50727.1433; ASP.NET Version:2.0.50727.1433

    Any help would be greatly appreciated...

  • Re: What am I missing?

    05-02-2008, 8:14 AM
    • Member
      506 point Member
    • dkirk
    • Member since 12-23-2007, 3:57 PM
    • Charlotte, NC
    • Posts 285

    Well, I managed to get all the errors cleared and I got the site to run. Not everything is functioning as it should be at least there is progress. I think the author has left out a few steps in his code...

  • Re: What am I missing?

    05-02-2008, 11:02 AM
    • Contributor
      6,366 point Contributor
    • Lee Dumond
    • Member since 11-03-2004, 2:51 PM
    • Decatur, IL USA
    • Posts 1,168

    If you are assuming that this is a "step-by-step" book, you'd be mistaken.

    You are right -- the author skips a LOT of steps. That's on purpose.

    The author assumes you will examine the downloaded code, and the book then briefly explains the more complex classes and some of the interesting methods, and steps you through a few of the trickier parts only. The parts that are examined in detail are, for the most part, the new functionality that was introduced in ASP,NET 2.0. Therefore, you won't be able to re-create the code by using the book alone, as most of the non-2.0 legacy code isn't detailed in the book.

  • Re: What am I missing?

    05-22-2008, 5:40 AM
    • Participant
      1,692 point Participant
    • Wyerarch
    • Member since 05-22-2008, 9:39 AM
    • Lincolnshire, England
    • Posts 397

    Can you please tell me how you solved the error? I have exactly the same one, and it is driving me mad!

    If this answered your question, please mark as an answer so others will know too.

    http://wyerarch.blogspot.com
  • Re: What am I missing?

    05-22-2008, 8:00 AM
    • Member
      506 point Member
    • dkirk
    • Member since 12-23-2007, 3:57 PM
    • Charlotte, NC
    • Posts 285

    Hello Wyearch,

    In the page directive of the Default.aspx, make sure that you inherit the MB.TheBeerHouse.UI namespace. See code below

    aspx page:

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="MB.TheBeerHouse.UI._Default" Title="Untitled Page" %>

    <asp:Content ID="Content1" ContentPlaceHolderID="RightContent" Runat="Server">

    </asp:Content>

    <asp:Content ID="MainContent" runat="server" ContentPlaceHolderID="MainContent">

    <asp:Image ID="imgBeers" runat="server"

    ImageUrl="~/Images/3beers.jpg" ImageAlign="left" hspace="8" />

    Lorem ipsum dolor sit amet, consectetuer adipiscing elit...

    </asp:Content>

    <asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" Runat="Server">

    </asp:Content>

    code behind:

    using System;

    using System.Data;

    using System.Configuration;

    using System.Collections;

    using System.Web;

    using System.Web.Security;

    using System.Web.UI;

    using System.Web.UI.WebControls;

    using System.Web.UI.WebControls.WebParts;

    using System.Web.UI.HtmlControls;

    namespace MB.TheBeerHouse.UI

    {

    public partial class _Default : BasePage

    {

    protected void Page_Load(object sender, EventArgs e)

    {

     

    }

    }

    }

     

  • Re: What am I missing?

    06-11-2009, 6:11 PM
    • Member
      4 point Member
    • damole
    • Member since 04-23-2008, 3:07 AM
    • Posts 2

    I ran into this today and the problem you are experiencing is identified here: 'ASP.controls_themeselector_ascx.FrameworkInitialize()': no suitable method found to override - it is the last line in the details of the error.

     when you create the themeselector control class (themeselector.ascx.cs), it will be named Controls_ThemeSelector which conflicts the directive in your themeselector.ascx file.

     

    rename the themeselector class to ThemeSelector sans the Controls_ and replace the inherits with Inherits="MB.TheBeerHouse.UI.Controls.ThemeSelector" on your themeselector.ascx file

Page 1 of 1 (6 items)