Answers and code snippets from ASP.NET projects (Webforms/MVC/Classic ASP)
public void ProcessRequest(HttpContext context) { context.Response.BinaryWrite(Image2Byte(CreateBitmapImage("Hello World"))); context.Response.Cache.SetCacheability(HttpCacheability.Public); context.Response.Expires = 100; }