p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 (http://p2p.wrox.com/forumdisplay.php?f=264)
-   -   Chapter 3, cannot build due to health monitoring (http://p2p.wrox.com/showthread.php?t=49606)

stzd8 October 30th, 2006 09:36 AM

Chapter 3, cannot build due to health monitoring
Ok guys,

I am at the end of Chapter 3, where the 'Configuring Health Monitoring System'. Here we have to create an additional project to put the 'customevent'. I did that and entered the code as in the book. But now it won't compile!!!!

It shows that it several namespaces does not recognize, like using System.Web.Security; -> "Security"
using System.Web.UI; -> "UI"
using System.Web.UI.WebControls; -> "UI"
using System.Web.UI.WebControls.WebParts; -> "UI"
using System.Web.UI.HtmlControls; -> "UI"
using System.Web.Management; -> "Management"

I don't know how you guys managed it, but I could use some help from the community.

stzd8 October 30th, 2006 11:41 AM

Ok, I managed to compile the CustomEvents project, it was missing the System.Web reference. BUT!!!!! On my web project, it cannot build or compile due to a section on the "Web.Config".

            <add name="TBH Events" type="MB.TheBeerHouse.WebCustomEvent, MB.TheBeerHouse.CustomEvents" />

This is the health monitoring section, it says that 'cannot find specified file'. Can somebody be kind enough to shine me the path on this????

MythicalMe October 30th, 2006 02:00 PM

I've written about this before.

If you use ILDASM you'll find that "MB.TheBeerHouse.CustomEvents" compiles to "MB.MB.TheBeerHouse.CustomeEvents". You can eliminate the first "MB." by removing the default namespace from the Custom Events project property.

stzd8 October 30th, 2006 03:10 PM


I apologize on my ignorance, but how do I know if I am using ILDASM or is there a way to switch ?

stzd8 October 30th, 2006 03:15 PM


I did remove "MB" from the namespace of the CustomEvents.cs and still get the error 'Could not load file or assembly 'MB.TheBeerHouse.CustomEvents'.

I did fix that issue, I had to double click on the properties of the CustomEvents and set the namespaces. BUT now it still won't compile, because it cannot find reference to 'TheBeerHouseSection' on the Globals.cs of the web project. I did all the stuff like on the book, so I don't see where to point the compiler to find 'TheBeerHouseSection'

pleb February 25th, 2007 12:02 AM

Hi stzd8,

I just had this problem. I resolved it by doing the following.

1. Scratch head until sore.
2. Open the properties window of the custom events project
3. Change the assembly name to "MB.TheBeerHouse.CustomEvents"
4. Change the Default namespace to "MB.TheBeerHouse"
5. Recompile the events project
6. Recompile the web project.

phealy02 February 27th, 2007 05:55 PM

Thanks 'Pleb' - spot on advice that I needed.

I'd just figured out what the problem was, but was going to leave my bin file as "TBH_CustomEvents.dll" as I didn't know how to generate the name I wanted. I could see it should be this from the downloaded chapters.
Some of us are mortal.

pleb February 27th, 2007 07:14 PM

Thanks phealy02, it's good to see my post has helped someone. :D

motemape May 11th, 2007 02:23 PM

Thank you guys :)

I had the same problem and I was dying with this .dll CustomEvents(Chapter 3) over many many days, but now it's solved with your help.

I am still looking for the best way to read this book, as the database is not so much covered in the book.

I am a newbie to C# that is why I find this book very hard [V]

englere May 11th, 2007 04:18 PM

This is not a book for newbies. This doesn't cover every detailed mouse click and keystroke, and so it assumes a certain amount of familiarity with .NET, C#, and SQL.

You should always get the code download and study that as you read sections in the book. This code download includes a complete database.

But you might not understand the book very well until you get more familiar with .NET. This is a complex subject, I'm afraid. First you must understand the language and the platform. Then you have to understand the basics of ASP.NET web development and how to build simple web pages. Then, lastly, you need to tackle architecture and overall website design and implementation (which is the subject of this book).


All times are GMT -4. The time now is 10:21 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.