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)
-   -   Problems with Chapter 3 (http://p2p.wrox.com/showthread.php?t=51519)

Steve887 December 13th, 2006 09:40 PM

Problems with Chapter 3
First off, I know this book is not meant to hold hands and explain everything. However, I am having real difficulty understanding chapter 3, and keep getting errors.

I see from the code download that there are .dll files and SQL data files and .pdb files and the separate Custom Events folder itself, but I have no idea how to get any of these files into my project, nor how to link the custom events.

Perhaps if someone could do a little hand holding, because from browsing the forum, it seems that chapter 3 has some of the highest levels of questions.

Thanks all.

MythicalMe December 14th, 2006 02:27 AM

The reason I created the chapter by chapter code was to help those like you. Have you gone to the code downloads and looked it over?

Also, try to be a little more specific about your problem. It's hard to narrow down when you just say Chapter 3.

Steve887 December 14th, 2006 02:44 AM

I have downloaded the chapter code, but I don't know how to get to that point with the .dll files and the rest.

Perhaps I'm just missing something.

MythicalMe December 14th, 2006 03:31 AM

Can you be a little more specific? What errors are you getting? Don't post them all, only the relevent ones.

Steve887 December 14th, 2006 03:52 AM

"Error 9 Could not load file or assembly 'MB.AviationDownunder.CustomEvents' or one of its dependencies. The system cannot find the file specified. D:\Aviation Downunder\web.config 64
Note I have copied everything exactly from the chapter download, only changing names to suit.

My current directory structure (if that helps) is:

Main - contact.aspx
       - contact.aspx.cs
     - default.aspx
       - default.aspx.cs
     - template.master
       - template.master.cs
     - web.xml

App_Code - BLL - BizObject.cs
         - DAL - DataAccess.cs
         - BasePage.cs
         - ConfigSection.cs
         - Globals.cs
         - Helpers.cs

AD_CustomEvents - customevents.cs

There's more, but they relate to the theme's which arn't covered in this chapter.

I hope that's enough info for you.


Steve887 December 15th, 2006 08:10 PM


MythicalMe December 15th, 2006 11:19 PM

Sorry Steve.

Your biggest problem is that web.config has been renamed web.xml. Why is that?

Second, If you haven't already done so, you neeed to add a project to handle the events. This is shown in the chapter by chapter code and I even left the project properties page open so that it can be seen when you first open the solution.

Steve887 December 16th, 2006 06:48 AM

It is actually named web.config, I was just reading from Windows Explorer where it showed up as XML.

I never actually noticed the solution thing before, that'll help.[:p]

Couple more q's about it though, how do you get the DLL, PDB and MDF files and how do you add the Custom Events project so it's part of the overall project?

I also get an error when I try to open to solution: "The application for project "..\TBH_CustomEvents.csproj" not installed."

How do I fix this?

Thanks for your patience.:)

MythicalMe December 16th, 2006 02:13 PM

The DLL (Dynamic Link Library) and PDB (Debug) files are created when you compile the project for the first time. You can add it to the Web project by right clicking it in the solution explorer and selecting "Add Reference". Now select the Projects tab and select your events project. The DLL and PDB files will be copied to the BIN folder of your web project and if you have to make any changes to the events project the files will be automatically updated.

There are a number of ways of creating the MDF file. The easiest way is use "Website/ASP.NET Configuration". Select the security tab and use the "Security setup wizard". The drawback to this is that if you create any users those users are coded for maximum security and the provider you'll be using codes for a slightly less secure method. What does that mean? Simply that the password will be unretrievable.

saille January 17th, 2007 09:02 PM

I am wondering if, like me, Steve is using Visual Web Developer 2005.
That would explain why he's having trouble with the Custom Events, since Visual Web Developer 2005 doesn't allow you to compile your code into assemblies.
I was hoping to use only Visual Web Developer 2005 to work through the book, but it looks like I may have to shell out for Visual Studio 2005, unless there's anonther way

I do not understand why Custom Events should have to be compled anyway - this seems like a workaround for a flaw in ASP.NET. Can anyone shed some light on that?

All times are GMT -4. The time now is 01:44 AM.

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