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)
-   -   web.config <compilation> <assemblies> (http://p2p.wrox.com/showthread.php?t=64959)

Jophie January 2nd, 2008 05:58 PM

web.config <compilation> <assemblies>
Hello All,

I hope someone can help me to explain why we need the following code in web.config.

In web.config (from TBH's full version), we have

<compilation debug="true">
   <add assembly="System.Transactions, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
   <add assembly="System.Web, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
   <add assembly="System, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

My questions: why do we need <add assembly= ...> in web.config since we have mentioned in TBH_CustomEvents?? I am very curious. I tried to find it from the book, but I couldn't. Other books did mention, we should add reference in web.config.

Is it important that to have them in web.config?? But we have a custom events already. Please help and solve my questions.
Thanks in advance,


englere January 5th, 2008 01:31 AM

TBH_CustomEvents is a separate project. The web project (I know they don't use the word "Project" any more) does not have access to any references made in a different project. There are 2 ways to add a reference to an ASP.NET project: add the assembly tags to either web.config or individual pages, or else copy the assemblies to the bin folder.

By the way, the assemblies you mentioned above are not there for the sake of events. The CustomEvents assembly doesn't need an entry in web.config because it gets copied to the bin folder of the web site.


Jophie January 10th, 2008 12:04 PM

Thank you very much.


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

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