我定义了一个自定义 HttpHandler,
public class RequestHandler : IHttpHandler
我通过它传递了我所有的请求,
<configuration>
<system.webServer>
<handlers>
<add name="RequestHandler" path="*" verb="*" type="WebApplication6.RequestHandler" />
</handlers>
</system.webServer>
每次有人请求页面时,这个类都会重新构造吗?
最佳答案
如果IHttpHandler.IsReusable
返回true
,则处理程序将被重用。
关于asp.net - HttpHandlers 是否会重新实例化每个请求?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4567811/