문제

I am creating one handler for processing image. When i try to request the url http://localhost/ProcessImage.ashx the ProcessRequest is getting invoked by default. This is not a Constructor. But how it is getting called by default?

public class ProcessImage : IHttpHandler
{

    public void ProcessRequest(HttpContext context)
    {
    }
}
도움이 되었습니까?

해결책

You can look at the ASP.NET Application Lifecycle. For handlers (IHttpHandler), the implementation of the method ProcessRequest is called whenever you access/request for the handler.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top