Last post Sep 18, 2006 10:51 PM by bitmask
Sep 18, 2006 06:35 AM|picosam|LINK
I have a class that implements IHttpModule which I use to capture URLs of a "RESTful" style and handle them. I also have a class that inherits from
ConfigurationSection which handles a custom Web.Config section for regular expression matching of these URLs. My questions are:
Sep 18, 2006 10:51 PM|bitmask|LINK
1) No - there will not be one instance per request, but the runtime will create multiple instances of your module. The instances can be reused across many requests.
2) It won't be creating an instance on every hit, so it's not as much overheard as you think.
3) It is stateful, but you are not holding user state (like a user's shopping cart), so it's not the kind of state we typically have to worry about.
This article might help: http://www.odetocode.com/Articles/89.aspx
Keep in mind your module will be created for each HttpApplication instance.