GAC web.config and Custome Events ASP .net 2.0

R

Ryan

I created a custom event: MyPasswordChangedEvent. The .dll name is
MyWebEvent. I created a strong name and added it to the GAC. So far
so good. I know want to define an event using the new assembly and I
want it available to ALL web applications, so I went to modify the
global web.config file as follows:

<add assembly="MyWebEvent, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=ac21b43a32ac5432"/>

in the compilations-->assemblies section.

This line does not seem to be cause a problem. I then add the
following provider under Health Monitoring:

<add name="My Password Change Event"
type="MyPasswordChangedEvent,MyWebEvent,Version=1.0.0.0,Culture=neutral,PublicKeyToken=ac21b43a32ac5432"/

I have tried this in both the event mapping AND the profile sections.

Both ways I get the same message

Could not load file or assembly MyWebEvent, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=ac21b43a32ac5432or one of its
dependencies. The system cannot find the file specified.

What am I doing wrong? Do I need to make an entry in the
machine.config file as well?
 
R

Ryan

Isn't it great when we can answer our own questions...it turns out i
had two errors. First, I had a typo. More importantly, I was missing
a full type declation. The .dll name was MyWebEvent. The class had
the same name, and there was the PasswordChangeEvent within the
class...

Sooo...my global web.config entry should have read:

<add name="My Password Change Event"
type="MyWebEvent.MyWebEvent.MyPasswordChangedEvent,MyWebEvent,Version=1..0.0.0,Culture=neutral,Pub­
licKeyToken=ac21b43a32ac5432"/

Hope that helps someone else!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top