I've got an HttpModule in my application that hooks into the FormsAuthenticationModule's Authenticate event with the following code:
public void Init(HttpApplication context)
{
FormsAuthenticationModule faModule =
(FormsAuthenticationModule)context.Modules["FormsAuthentication"];
faModule.Authenticate +=
new FormsAuthenticationEventHandler(faModule_Authenticate);
}
Unfortunately, the call to context.Modules fails because the app needs to run in a medium-trust environment. Is there another way that I can hook into this event?