This is a tricky question: you cannot even access the module collection in your global application file.
AuthenticateRequest Global:
protected void Application_AuthenticateRequest(object sender, EventArgs e)
{
}
, .
AspNetHostingPermission ( ) web.config, !