I was trying to get a custom module's event attached to Global.asax without
success. Apparently HttpApplicationFactory's AddHandler was always using
EventHandler instead of the EventInfo's EventHandlerType. The attached patch
has a one line fix.

I've tested this patch against my custom module event as well as an
Application_OnError wireups - both works.

Hope this helps,

~ Matthew
--- HttpApplicationFactory.cs	2006-04-12 14:24:33.000000000 -0400
+++ HttpApplicationFactory.cs.new	2006-04-12 14:24:51.000000000 -0400
@@ -280,7 +280,7 @@
 				evt.AddEventHandler (target, npi.FakeDelegate);
 			} else {
 				evt.AddEventHandler (target, Delegate.CreateDelegate (
-							typeof (EventHandler), app, method.Name));
+							evt.EventHandlerType, app, method.Name));
 			}
 		}
 
_______________________________________________
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

Reply via email to