【发布时间】:2010-09-30 16:56:32
【问题描述】:
我的应用程序中有一个 HttpModule,它使用以下代码连接到 FormsAuthenticationModule 的 Authenticate 事件:
public void Init(HttpApplication context)
{
FormsAuthenticationModule faModule =
(FormsAuthenticationModule)context.Modules["FormsAuthentication"];
faModule.Authenticate +=
new FormsAuthenticationEventHandler(faModule_Authenticate);
}
很遗憾,对 context.Modules 的调用失败,因为应用需要在中等信任环境中运行。还有其他方法可以让我参与此活动吗?
【问题讨论】:
标签: asp.net events forms-authentication httpmodule medium-trust