using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Drawing;
using System.IO;
using System.Text;
using System.Web.SessionState;//不然session不能使用
namespace YZM
{
/// <summary>
/// Handler1 的摘要说明
/// </summary>
public class Handler1 : IHttpHandler,IRequiresSessionState//2.继承接口
{
public void ProcessRequest(HttpContext context)
{
context.Response.ContentType = "image/Jpeg";
System.Drawing.Image img = new Bitmap(100, 30);
Graphics g = Graphics.FromImage(img);
this.AddPoint(img, 100);//噪点
string code = this.GeneralCode();//时间
Font font1 = new Font("宋体", 20, FontSty