创建Asp.Net Web程序建一个Handler类调用IHttpHandler接口
public class handler : IHttpHandler,IRequiresSessionState
{
public bool IsReusable => false;
private Random RandomSeed = new Random();
public void ProcessRequest(HttpContext context)
{
//string uri = context.Request.PhysicalPath;
//Bitmap bitmap = new Bitmap(uri);
//Graphics gra = Graphics.FromImage(bitmap);
//gra.DrawString("xxx", new Font("楷书", 20, FontStyle.Bold), Brushes.Red, new Point(700, 800));
//gra.Flush();
//bitmap.Save(context.Response.OutputStream, System.Drawing.Imaging.ImageFormat.Jpeg);
//context.Response.WriteFile(uri);
string strWord = "23456789qwertyuiopasdfghjklzxcvbnm";
string NumStr = null;
for(int i = 0; i < 5; i++)
{
NumStr += strWord[RandomSee