I come to the same annoyance. To make the @ brichins / link decision a little further, instead of using inheritance in your ashx, just reference the class in the AppCode folder directly.
the ashx file will only contain
<%@ WebHandler Language="C#" Class="MyHandler" %>
Then create this file /MyHandler.cs in the AppCode folder
using System; using System.Web; public class MyHandler : IHttpHandler { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; context.Response.Write("Hello World"); } public bool IsReusable { get { return false; } } }
Use namespaces to avoid class name conflicts if necessary.
source share