![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Handling Application.Start via Custom HTTP Module Using ASP.NET 3.5: Can a custom HTTP Module be used to register for the Application_Start event? Or _must_ I use Global.asax to work with Application.Start? I understand that I can use a custom HTTP Module to register for other pipeline events (like Application.BeginRequest), but I was told that the only place that I can set up an event handler for Application.Start is in Global.asax. My preference would be to register an HTTP Module in Web.config that, upon its initialization, has logic that determines if Application.Start needs to be handled, and if so, which class and method (that I load dynamically into the application's default AppDomain) is to handle Application.Start. So, ideally, things would go like this (please tell me if you see any problems with doing things this way): 1. When the application is first started, a custom HTTP module is loaded (per Web.config). 2. That custom HTTP module has logic that determines if Application.Start is to be handled. 3. If runtime conditions dictate that Application.Start is to be handled, then the HTTP module proceeds to load the correct assembly, instantiate the correct class, and register the correct Application.Start event handling method with the Application.Start event. 4. The Application.Start event is then raised, thereby invoking the event handling method wired up in step 3 above. For the above to work, I would have to rely on somethig that I don't quite understand... and that is the sequence of activities that take place when an ASP.NET application is started: in particular, I would need to be able to count on my custom HTTP module being loaded *before* Application.Start is raised. Can I count on that sequence? Your feedback and comments are appreciated! |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Distribute Custom Visual Studio Module | .NET General | |||
| Handling param statement in custom host application | PowerShell | |||
| Custom Http Handler Factory and Possible Concurrency Issues on Application Start | .NET General | |||
| I hate the handling by Vista of HTTP mail or lack thereof!!!! | Vista mail | |||