GAC web.config and Custome Events ASP .net 2.0



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=,
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"

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=,
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?




Isn't it great when we can answer our own 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... global web.config entry should have read:

<add name="My Password Change Event"

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