Wrox Programmer Forums
|
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 9th, 2006, 01:13 PM
Registered User
 
Join Date: Oct 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default No answers in Forum to problem with CustomEvents

There are 4-5 forum topics about the common problems with accessing the CustomEvents class. None of them seem answered to the satisfaction of the original post-er. I have a similar problem.

I have successfully compiled and run the original sample code. I am now trying to move toward developing my own site using the book concepts. I tried building a new site from scratch (in small steps) but had many problems. I am now trying the reverse: take the original working code and move away from it in small steps.

My first small step is to change the namespace used in the CustomEvents project. I changed the namespace in the CustomEvents file, changed the assembly name to isol.syn.CustomEvents, changed the root namespace to isol.syn and successfully rebuilt the project (under both Debug and Release). The isol.syn.CustomEvents.dll is now found under CustomEvents/bin and CustomEvents/obj for both debug and release.

I manually deleted the MB.TheBeerHouse.CustomEvents.dll files from the web bin folder. I removed references in the web project to MB.TheBeerHouse.CustomEvents and added a new reference to isol.syn.CustomEvents. I updated the web.config file eventmappings to type="isol.syn.WebCustomEvent, isol.syn.CustomEvents".

When I rebuild the solution, the isol.syn.CustomEvents.dll file is successfully copied to the web bin folder. However, I get an error message:

could not load type 'isol.syn.WebCustomEvent' from
assembly 'isol.syn.CustomEvents'.

I receive 13 related errors that 'type RecordDeletedEvent is not defined.'

Any thoughts on what I'm doing wrong?

Thanks!



Kevin
 
Old November 27th, 2006, 12:44 AM
Registered User
 
Join Date: Nov 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please ... someone can explain step by step about it.
i have problems too .. and i cant with the project .. thanks

 
Old November 27th, 2006, 11:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 917
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You really need to open ildasm from a VS 2005 command prompt and then open that DLL to see what it has in it. This kind of problem can usually be fixed in about a minute.

You also need to ensure that the assembly is not in the GAC, or if it is there, it has to be the newest version (look in c:\windows\assembly).

You don't really need a reference to this DLL in the ASP.NET solution, but it won't hurt. This just copies it to the bin folder, or possibly makes an entry in web.config.

I prefer to keep web.config as clean as possible, and you get an automatic reference to all assemblies in the main bin folder.

By the way, the convention for parts of a namespace is to use Pascal case, since these are inherantly public. But it's just a convention and won't affect the operation of your site.

Eric

 
Old June 17th, 2008, 02:19 PM
Registered User
 
Join Date: Jun 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You don't really need a reference to this DLL in the ASP.NET solution, but it won't hurt. This just copies it to the bin folder, or possibly makes an entry in web.config.


can u show me how to edit the web.config file in thebeershouse project without using the CustomEvents.dll and so on.

after replace the all the keyword thebeerhouse to Home. run in debug mode come out

Parser Error Message: Could not load file or assembly 'MB.Home.CustomEvents' or one of its dependencies. The system cannot find the file specified.

 
Old June 18th, 2008, 05:36 AM
Registered User
 
Join Date: Jun 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I don't know if this may be the case, but anyway:
Have you split your code into different projects? If so, have you signed the projects you are referencing? Some scenarios where you need to dynamically generate an instance of a given class (for instance, by using System.Activator.CreateInstance) require that:
a.) the class you wish to instantiate belongs to the same project you are trying to instantiate it in;
b.) you are using a fully qualified class name; or
c.) the project the desired class belongs to is signed.
Changing your namespaces' names doesn't make a difference here; splitting your code into different projects definitely does.





Similar Threads
Thread Thread Starter Forum Replies Last Post
HELPPP CustomEvents nichola_x_rose BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 8 April 24th, 2008 06:24 AM
Any1 have a TBH CustomEvents Source? krainov BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 December 28th, 2007 01:54 AM
CustomEvents Lib Project tectrix BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 10 June 16th, 2007 12:59 PM
Ch 3: CustomEvents.dll lmod BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 January 10th, 2007 12:43 PM
Source for MB.TheBeerHouse.CustomEvents.dll? deasoft BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 November 5th, 2006 04:12 AM





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