C# 我怎么能忽略一个“问题”;“重定向”;来自IHttpHandler的请求

C# 我怎么能忽略一个“问题”;“重定向”;来自IHttpHandler的请求,c#,ihttphandler,C#,Ihttphandler,我已经将IHttpHandlerFactory映射到“所有”http请求 <httpHandlers> <add verb="*" path="*.*" type="HomeController"/> </httpHandlers> 处理程序代码 public class HelloWorldHandler2 : IHttpHandler { public HelloWorldHandler2() { } public bool busy = f

我已经将IHttpHandlerFactory映射到“所有”http请求

<httpHandlers>
    <add verb="*" path="*.*" type="HomeController"/>
</httpHandlers>
处理程序代码

public class HelloWorldHandler2 : IHttpHandler
{
 public HelloWorldHandler2()
{

}
public bool busy = false;

public void ProcessRequest(HttpContext context)
{
    HttpRequest Request = context.Request;
    HttpResponse Response = context.Response;
    // This handler is called whenever a file ending 
    // in .sample is requested. A file with that extension
    // does not need to exist.
    //Response.Write("<html>");
    //Response.Write("<body>");
    //Response.Write("<h1>backup handler</h1>" );
    //Response.Write("</body>");
    //Response.Write("</html>");
    context.Handler = this;
    Response.Redirect("About.aspx");
}



public bool IsReusable
{
    // To enable pooling, return true here.
    // This keeps the handler in memory.
    get { return false; }
}
}
公共类HelloWorldHandler2:IHttpHandler
{
公共HelloWorldHandler2()
{
}
公共bool busy=false;
公共void ProcessRequest(HttpContext上下文)
{
HttpRequest请求=context.Request;
HttpResponse Response=context.Response;
//每当文件结束时,就会调用此处理程序
//请求了一个扩展名为.sample的文件
//不需要存在。
//回答。写(“”);
//回答。写(“”);
//Write(“备份处理程序”);
//回答。写(“”);
//回答。写(“”);
context.Handler=this;
重定向(“About.aspx”);
}
公共布尔可重用
{
//要启用池,请在此处返回true。
//这会将处理程序保留在内存中。
获取{return false;}
}
}
如您所见,工厂调用处理程序,处理程序重定向页面,
重定向再次调用工厂…

不要调用ProcessRequest内的Response.Redirect(“About.aspx”)。使用路线与论坛网站不同,我们不使用“感谢”或“感谢任何帮助”或签名。看。谢谢马丁!非常感谢(我希望管理员不要删除这个感谢信息)。约翰·桑德斯,你们真的很喜欢“Editing”“不是吗:)。每次我提交一个问题,首先发生的事情是一些管理员删除一两个字,以便在帖子中得到他的名字。感谢其他专业人士花时间考虑我的问题有什么不对吗?从现在起我将尽量不讲礼貌。(如果你不删除我的账户来质疑你的“权威”),我要求你保留这条评论,并以专业人士的身份对此作出回应。
public class HelloWorldHandler2 : IHttpHandler
{
 public HelloWorldHandler2()
{

}
public bool busy = false;

public void ProcessRequest(HttpContext context)
{
    HttpRequest Request = context.Request;
    HttpResponse Response = context.Response;
    // This handler is called whenever a file ending 
    // in .sample is requested. A file with that extension
    // does not need to exist.
    //Response.Write("<html>");
    //Response.Write("<body>");
    //Response.Write("<h1>backup handler</h1>" );
    //Response.Write("</body>");
    //Response.Write("</html>");
    context.Handler = this;
    Response.Redirect("About.aspx");
}



public bool IsReusable
{
    // To enable pooling, return true here.
    // This keeps the handler in memory.
    get { return false; }
}
}