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