public class ImageHandler:IHttpHandler
{
public ImageHandler()
{ }
#region IHttpHandler Members
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "image/jpeg";
context.Response.Clear();
context.Response.WriteFile(context.Request.PhysicalPath);
context.Response.End();
}
#endregion
}
On IIS Server
Open Configuration settings,On Mappings tab click Add
In This dialog set executable as %RootFolder%/windows/framevork/%version%/aspnet_isapi.dll
and extension as *.jpg
and undo check the "check that file exists"
than click apply.
On Web Site's web.config folder
add
in the
Links Article
target="_blank">look this one
No comments:
Post a Comment