I have created a class that inherits from IHttpHandler

public class MyGenericHandler : IHttpHandler
{
    public User user;
    public void ProcessRequest(HttpContext context)
    {
        user = Extensions.GetUser();
    }
    public bool IsReusable
    {
        get
        {
            return false;
        }
    }
}

Now I'm creating a Generic Handler (.ashx) that inherits from the class above:

<%@ WebHandler Language="C#" Class="test" %>

using System.Linq;
using System.Web;
public class test :MyGenericHandler
{

    public void ProcessRequest(HttpContext context)
    {
        ((MyGenericHandler)this).ProcessRequest(context);
        context.Response.Write("test");
    }
}

But the code context.Response.Write("test"); never executes. but the one in the first class (context.Response.Write("test");) is triggered.

Related posts

Recent Viewed