C# 自定义的IHttpModule中如何获取当前Context的IHttpHandler的执行个体

2025-03-04 14:56:13
推荐回答(1个)
回答1:

private void Application_BeginRequest(object sender, EventArgs e)
{
HttpApplication application = (HttpApplication)sender;
HttpContext context = application.Context;
HttpRequest request = application.Request;
HttpResponse response = application.Response;
}
init 函数中调用