我想创建自己的动态横幅,所以我开始创建一个图像处理程序,atm 我有这个代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace Faeria
{
/// <summary>
/// Summary description for FaeriaImage
/// </summary>
public class FaeriaImage : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "image/jpeg";
context.Response.Write("~/Images/bg1.jpg");
}
public bool IsReusable
{
get
{
return false;
}
}
}
}
但是当我调用“http://localhost:12361/FaeriaImage.ashx”时,我只会得到这个:http ://abload.de/image.php?img=1deib0.jpg 。
当我在我的网站上调用它时,我没有得到任何图像。
我的错误是什么?