Is there any scenario s where I would want to Implement IhttpModule ?
BeginRequest   : 
So I did this : 开发者_Python百科
public partial class ServerTransferThings : System.Web.UI.Page , IHttpModule
{
 ....
 public void Init(HttpApplication context)
 {
     context.BeginRequest += lalala;
 }
 void lalala(object sender, EventArgs e)
 {
 }
}
But it doesn't work.  I think it's too early stage becuase the beginRequest executes  before the Page object creation .
Am I right ?
Is the solution to create a DLL which implements the IHttpModule and then use the events ?
No, that's quite a code smell. Pages are far enough down the pipe you can't access BeginRequest.
If you want an HttpModule, you can create a class in your project and implement them there. You will have to configure them in the web.config.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论