hello,
I need to register a custom mvc filter. In a regular mvc app it is trivial and I can do it in the global.asax file. In DynamicWeb 9 however we don't have access to this and if I'm correct, the recommended approach is to use notification events to hook up into application lifecycle and customize it.
As far as I know, if I need a custom filter, I should use the "AfterDynamicwebStart" event, so I got a basic code like this:
[Subscribe(Standard.Application.AfterDynamicwebStart)] public class OnAfterDynamicwebStart : NotificationSubscriber { public override void OnNotify(string notification, NotificationArgs args) { var argsMapped = args as Standard.Application.AfterDynamicwebStartArgs; } }
It is triggered correctly. But how exactly can I use those "BeforeStartArgs" to get into the app fliters collection and add something to it? I can't figure out this part.