In ASP.NET, can an HTTPHandler skip the Global.asax.cs Application_BeginRequest Handler? -
I'm running under IIS 6.
I have found a http handler which requests a specific file extension (let's call detail. Foo).
My Application_BeginRequest handler in Global.asax.cs performs an operation that I want to be in response to No .foo requests.
I know that within the Application_BeginRequest handler, I can execute a conditional operation based on HttpContext.Current.Path (or something like that), but I would not want to be dirty describing Global.asax.cs The logic of the file, he should not need to know about it.
The HttpHandler of the .foo file is always preferred to leave the application / BeginRequest handler.
Thank you!
I do not think this is possible. Before the IIS, the application_ BeginRequest event is removed, it also knows that HTTPHandler is going to take action on the request.
Global.XX creation is out of the small amount that you are essentially getting is similar to the custom HTML module ... and by definition, all the requests passed through all the registered modules Have to do. As a matter of fact, I think it is ok to add logical to the BeginRequest handler only to perform rationally. But what might you really want to do, take this argument into the custom HTML module? Or many modules ... then the code and logic is less "screwed".
Comments
Post a Comment