 |
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
|
|
|
|
|

May 30th, 2007, 06:07 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
CustomEvents Lib Project
Hi everyone.
I added a new Lib Project for Custom Events. I compiled and referenced its .dll in the original project. Eveything went fine. But now when I use this in healthMonitoring section of config file, I get this error:
Error 1 Could not load file or assembly 'SN.TectrixWebSite.CustomEvents' or one of its dependencies. The system cannot find the file specified.
I guess I'm missing something.Can anyone figure out what I'm missing ?
|
|

May 30th, 2007, 06:45 AM
|
|
Friend of Wrox
|
|
Join Date: Mar 2007
Posts: 488
Thanks: 2
Thanked 11 Times in 10 Posts
|
|
tectrix,
unless you've recompiled the customevents solution with your new namespace ('SN.TectrixWebSite.CustomEvents'), then it will be called MB.TheBeerHouse.CustomEvents. you have two choices, either change the namespace name in the customevents solution to 'SN.TectrixWebSite.CustomEvents' and recompile, or reference it in your project under the MB.TheBeerHouse.CustomEvents namespace.
jimi
http://www.jamestollan.com
|
|

May 30th, 2007, 09:01 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I'm using 'SN.TectrixWebSite' in my whole website project.
|
|

May 30th, 2007, 10:29 AM
|
|
Authorized User
|
|
Join Date: May 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
<healthMonitoring heartbeatInterval="10800">
<providers>
<remove name="SqlWebEventProvider"/>
<add name="SqlWebEventProvider" connectionStringName="LocalSqlServer" buffer="false" bufferMode="Notification" maxEventDetailsLength="1073741823" type="System.Web.Management.SqlWebEventProvider,Sy stem.Web,Version=2.0.0.0,Culture=neutral,PublicKey Token=b03f5f7f11d50a3a"/>
</providers>
<eventMappings>
<add name="TBH Events" type="NameSpaceOfYourCustomEvents.ClassNameOfYourC ustomEvents, AssemblyNameOfYourCustomEvents"/>
</eventMappings>
<rules>
<clear/>
<add name="TBH Events" eventName="TBH Events" provider="SqlWebEventProvider" profile="Critical"/>
<add name="All Errors" eventName="All Errors" provider="SqlWebEventProvider" profile="Critical"/>
<add name="Failure Audits" eventName="Failure Audits" provider="SqlWebEventProvider" profile="Critical"/>
<add name="Heartbeats" eventName="Heartbeats" provider="SqlWebEventProvider" profile="Critical"/>
</rules>
</healthMonitoring>
i hope that can help you.
cheers
|
|

May 30th, 2007, 11:03 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I was doing it this way:
<healthMonitoring heartbeatInterval="10800" >
<providers>
<remove name="SqlWebEventProvider" />
<add name="SqlWebEventProvider" connectionStringName="LocalSqlServer"
buffer="false" bufferMode="Notification"
maxEventDetailsLength="1073741823"
type="System.Web.Management.SqlWebEventProvider,Sy stem.Web,
Version=2.0.0.0,Culture=neutral,PublicKeyToken=b03 f5f7f11d50a3a" />
</providers>
<eventMappings>
<add name="TW Events" type="SN.TectrixWebsite.WebCustomEvent,SN.TectrixW ebsite.CustomEvents" />
</eventMappings>
<rules>
<clear />
<add name="TW Events" eventName="TW Events"
provider="SqlWebEventProvider" profile="Critical" />
<add name="All Errors" eventName="All Errors"
provider="SqlWebEventProvider" profile="Critical" />
<add name="Failure Audits" eventName="Failure Audits"
provider="SqlWebEventProvider" profile="Critical" />
<add name="Heartbeats" eventName="Heartbeats"
provider="SqlWebEventProvider" profile="Critical" />
</rules>
</healthMonitoring>
I thought my assembly would be generated with the same name format as that of TheBeerHouse i.e SN.TectrixWebsite.CustomEvents, but it is generated with the name TWCustomEvents !
Thanx so much, my problem is solved now but I'm confused why my assembly didn't compile with the same name format as that of TheBeerHouse ?
|
|

May 30th, 2007, 03:25 PM
|
|
Authorized User
|
|
Join Date: May 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hello,
1 - right click on you CustomEvents project
2 - select properties
3 - select application tab
4 - set assembly name to --> SN.TectrixWebsite.CustomEvents
5 - set Default namespace to --> SN.TectrixWebsite
6 - compile your project again
that's all ;)
cheers.
|
|

May 31st, 2007, 08:37 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanx so much.
Okay, one thing more,my website is working fine with the new lib project.Yesterday when I closed it, the solution node was showing two projects(the original one and the new one of CustomEvents) but when I opened it today, it was showing only one project (the original one). The new lib project of CustomEvents is still being shown there, but as a normal folder without the special sign of another project. I think I don't manage my solution files properly. I don't like when VS saves the solution files by default here (C:\Documents and Settings\Tectrix\My Documents\Visual Studio 2005\Projects). So I rebuild the solution file in the same folder where the Website resides. Then I delete the solution file from the original location. I guess I've deleted that solution file. So if I want to know everything about how solution files work in VS where do I need to go to learn about it?
Thanx in advance. I'm really thankful to all the guys like you who patiently solves the newbies issues.
For the beginners to save them from embarrassment:
Everyone has to be a beginner first, to be an expert next! :D
|
|

May 31st, 2007, 05:23 PM
|
|
Authorized User
|
|
Join Date: May 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hello,
if you want to add another project to your solution, follow this steps :
1 - right click on your website solution
2 - select Add then Existing project
3 - select you customEvents project
4 - save all.
next time when, you open your solution (website solution), the two projects should be loaded.
NB:
add reference to customEvents project from you website project or
copy your customEvents assembly (SN.TectrixWebsite.CustomEvents.dll) to the bin directory of your website projet.
that's all ;)
cheers.
|
|

June 16th, 2007, 02:28 AM
|
|
Authorized User
|
|
Join Date: Jun 2006
Posts: 46
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thanx mesdouri.
I was away from my project for the last 16 days or so. I was busy in my mid-term examination.So couldn't try what you have suggested me. Today I tried it, and my application solution is now showing two projects. Thanx again for your help.
One thing I want to know which confuses me a lot. When you are developing your site, and each time you open it to work on it, you open the "Project/Solution" or "WebSite" ? or it doesn't matter whatever you open ?
|
|

June 16th, 2007, 07:53 AM
|
|
Authorized User
|
|
Join Date: May 2007
Posts: 28
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
hi,
always solutions if you want to view all related projects.
cheers.
|
|
 |