Explination of IsReusable RRS feed

  • Question

  • User857297241 posted
    What exactly does setting the IsReusable to True or False do and how does it pertain to the web application as a whole?
    Tuesday, March 8, 2005 3:24 PM

All replies

  • User-294030300 posted
    IsReusable Brian
    Monday, March 21, 2005 1:45 PM
  • User-751653828 posted
    The IsReusable property is there for ASP.NET should recreate the HttpHandler every single request that comes through the ASP.NET engine. So if you set IsReusable to true, ASP.NET will only make one instance of the HttpHandler to be served throughout the application life cycle. If IsReusable is set to false, ASP.NET will create a new instance of the HttpHandler for each request that comes in. So in other words, if Reusable is set to true, it follows the singleton pattern[:)]
    Sunday, April 10, 2005 4:00 AM
  • User-2049211745 posted

    sorry for bringing up this old thread. 

    If I set IsReusable = true, can I instantiate interops to STA COM components?  I know .ASPX pages allow this via ASPCOMPAT=true but there's no such thing for IHttpHandlers and WebHandlers (.ashx).  I need to call an interop to a STA COM component in a httphandler and I was wondering if it was safe to do this if IsReusable = true.

    Thanks for any help.

    Saturday, March 25, 2006 7:42 PM
  • User-2137848081 posted


    What's the benefit of a new instance of the HttpHandler with every request and vice-versa? Is it a threading thing? muplitple instances mean each request has it's own object to use.

    IsReusable = false eats up resources I guess on the Server. 



    Friday, February 2, 2007 12:28 PM
  • User-411691203 posted

    [8-)]Could somebody give me an useful examples with IsReusable=true and IsReusable=false.

    I couldn't find in MSDN and I'm curious about IsReusable.

    Thanks in advance 

    Tuesday, May 15, 2007 10:04 AM