using System; using System.Collections.Generic; using System.Linq; using System.Web; namespace Web12306 { public class CrxHandler:IHttpHandler { #region Implementation of IHttpHandler /// /// 通过实现 接口的自定义 HttpHandler 启用 HTTP Web 请求的处理。 /// /// 对象,它提供对用于为 HTTP 请求提供服务的内部服务器对象(如 Request、Response、Session 和 Server)的引用。 public void ProcessRequest(HttpContext context) { var request = context.Request; var response = context.Response; response.Redirect("http://www.fishlee.net/service/download/383"); } /// /// 获取一个值,该值指示其他请求是否可以使用 实例。 /// /// /// 如果 实例可再次使用,则为 true;否则为 false。 /// public bool IsReusable { get { return false; } } #endregion } }