I am looking at creating a handler to return images based on id passed through, I haven't created my own one before and when I created it it mentions that it has to be registered with IIS. This project is distributed to a lot of clients, will I have to change each one's IIS or is there some way round this or an alternative to a handler?
EDIT: In response to below, this is what I have created (but not yet tested), so will I need to change anything in IIS or web.config for this?
public class Photos : IHttpHandler
{
#region IHttpHandler Members
public bool IsReusable
{
get { return true; }
}
public void ProcessRequest(HttpContext context)
{
//write your handler implementation here.
var img = Image.FromFile(@"C:\Projects\etc\logo.jpg");
context.Response.ContentType = "image/jpeg";
img.Save(context.Response.OutputStream, ImageFormat.Jpeg);
}
#endregion
}