473,750 Members | 2,186 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

GAC web.config and Custome Events ASP .net 2.0

I created a custom event: MyPasswordChang edEvent. 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="MyWeb Event, Version=1.0.0.0 ,
Culture=neutral , PublicKeyToken= ac21b43a32ac543 2"/>

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="MyPasswor dChangedEvent,M yWebEvent,Versi on=1.0.0.0,Cult ure=neutral,Pub licKeyToken=ac2 1b43a32ac5432"/
>

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= ac21b43a32ac543 2or 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?

Feb 13 '07 #1
1 1219
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 PasswordChangeE vent within the
class...

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

<add name="My Password Change Event"
type="MyWebEven t.MyWebEvent.My PasswordChanged Event,MyWebEven t,Version=1..0. 0.0,Culture=neu tral,Pub*
licKeyToken=ac2 1b43a32ac5432"/

Hope that helps someone else!

Feb 13 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
6513
by: Dan Olson | last post by:
My question is not about how to update an application's config file during run-time, but how to invalidate the cached copy so that if a change to the config file is made, the application can use the new data without being restarted. Is there a programmatic way to invalidate the cached copy of an app.config file? In the "old" .INI file days, there was a work-around to this caching. How do we do it today? Help is appreciated.
1
5150
by: Ranjith Venkatesh | last post by:
I read and write to a config file which is the data store for this Windows Application written in C# using VS.NET 2003 in Windows XP. Now I want to trigger the program to read the config whenever I change it. I use a FileSystemWatcher with the path set to System.IO.Directory.GetCurrentDirectory(); and Filter set as <<AppName>>.exe.config
1
2172
by: Ray Stevens | last post by:
I have a dotnet wrapper service running on a service that calls one of our custome components. I would like to read the appsettings section from a config file, but because this is a class file reather than an .exe, app.config is not configured as .exe.config when compiled. What is the best way to read the app.config file from the .dll?
2
2141
by: Simon-Pierre Jarry | last post by:
Hi, I created a custom HttpModule for managing the security of my application. in "Init" sub, I regsiter the events doing that : Public Sub Init(ByVal context As System.Web.HttpApplication) Implements IHttpModule.Init httpApp = context
1
1267
by: jack | last post by:
Hi all i have just read and tried custome validation and its working fine the validation checks length of the field and returns a message if in valid is just wanted to know where all this custome validation can be used. just a reference will do.. thanks for replying me..
2
1858
by: Oleg.Ogurok | last post by:
Hi there, When a Windows App is compiled in Visual Studio 2005, app.config is renamed to MyAppName.exe.config and placed under either bin\Debug or bin\Release, depending on the currently selected Configuration (Debug or Release). Is there a way to have separate app.config files for each configuration (Debug and Release) and instruct VS/MSBuild to copy the right one during a build?
1
2067
by: Ryan | last post by:
I am trying to log events to SQL Server instead of the computers event log, but, although I get no errors, I have no luck. The webevents_events table is empty. I have a custom event that I am raising (passwordchange), and can see it beign raised successfully...just it seems to go nowhere. I have run aspnet_regsql to setup the database to handle event recording. I am fairly sure I am missing something in my web.config file. (I would...
3
1602
by: DaveP | last post by:
Hi all... Looking for some advice We have alot of services in vb6 and im re-writing them in c#...they all use xml files for start up config i want to write a class to support these files... is the best way to build collection object from the xml files thanks DaveP
3
9132
by: sreemathy2000 | last post by:
My requirement is to read a store the value of values in the custome section of app.config. in the form load i need to read the custom section and populate the values in the combobox. section can be like <links> <add key="key1" value="any value"> <add key="key2" value="any value"> <add key="key3" value="any value"> </links>
0
8999
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8836
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9575
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9338
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6803
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4712
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3322
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2223
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.