日期:2014-05-18 浏览次数:20428 次
public class FileUpLoadHandler : IHttpHandler, IRequiresSessionState, IReadOnlySessionState { public void ProcessRequest (HttpContext context) { context.Response.ContentType = "text/plain"; //context.Request.Headers.Add("Connection","keep-alive"); Request = context.Request; Response = context.Response; Response.Buffer = false; Response.BufferOutput = false; Server = context.Server; Session=context.Session; string pram=Request.QueryString["process"]; if (pram != null) { if (pram == "true") { Request.ContentType = "text/plain"; Response.ContentType = "text/plain"; object process =Session["Process"]; if (process != null) { Response.Write((string)process); } else { Response.Write("0"); } } } else { UpLoadFiles(); } } HttpRequest Request; HttpResponse Response; HttpServerUtility Server; HttpSessionState Session;