mpen
mpen

Reputation: 283043

Are HttpHandlers reinstantiated every request?

I've defined a custom HttpHandler,

 public class RequestHandler : IHttpHandler

Which I pass all my requests through,

<configuration>
    <system.webServer>
        <handlers>
          <add name="RequestHandler" path="*" verb="*" type="WebApplication6.RequestHandler" />
        </handlers>
    </system.webServer>

Does this class get re-constructed every time someone requests a page or not?

Upvotes: 2

Views: 133

Answers (1)

ChaosPandion
ChaosPandion

Reputation: 78282

The handler will be reused if IHttpHandler.IsReusable returns true.

IHttpHandler

Upvotes: 3

Related Questions