If you just want to implement your own HttpHandler using the
IHttpHandler interface you have to implement a function and a property
of the interface. The function ProcessRequest() is used to implement
your own custom request handler which returns the response according to
your code.
Now what is the significance of the property isReusable() which returns
true or false? I searched a lot but didn't found enough information on
this.
Also, i wanted to know that what should be the semantics of the request
for which we can set this property to return true? and in what scenario
it should be set to false?
Thanks in advance,
Regards,
AngrezIsReusable is for pooling of the handler objects. So if your handler is not
holding any request specific state then you can return true to ask that it
be pooled. This is typically done when your handler does very expensive initialization,
otherwise it probabaly doesn't matter if you return true or false (since
simple object allocation is fairly inexpensive in .NET). Pages are never
pooled, BTW.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Hi,
> If you just want to implement your own HttpHandler using the
> IHttpHandler interface you have to implement a function and a property
> of the interface. The function ProcessRequest() is used to implement
> your own custom request handler which returns the response according
> to your code.
> Now what is the significance of the property isReusable() which
> returns true or false? I searched a lot but didn't found enough
> information on this.
> Also, i wanted to know that what should be the semantics of the
> request for which we can set this property to return true? and in what
> scenario it should be set to false?
> Thanks in advance,
> Regards,
> Angrez
0 comments:
Post a Comment