locked
Making handler do "nothing" RRS feed

  • Question

  • User1918348658 posted

    So, if I want a httphandler to "do nothing" to the url ( say just some fancy logging, then send them to the request) How would one do that?

    Larry

    Wednesday, December 6, 2006 11:02 AM

All replies

  • User1918348658 posted

    Just to clarify a little. You have a handler set to process all *.aspx pages, and the ProcessRequest looks like this

    public void ProcessRequest(HttpContext context)

    {

    HttpRequest req = context.Request;

    Trace.WriteLine( req.Url.ToString() );

    //Now need to display the page.... 

    }

    I've tried several of the context.ReWrite and such, but no luck., Page always shows blank.

    Wednesday, December 6, 2006 12:07 PM
  • User952476018 posted

    An HttpModule is designed to hear * requests and might be a better choice.

    Have you tried....

    context.Server.Transfer("newPage.aspx");

    or

     context.Response.Redirect("newPage.aspx");
     

    Thursday, December 21, 2006 5:29 PM
  • User922302870 posted
    I agree, HttpModule  is better for your scenario, and usually you can only log ASP.NET level information.
    Monday, December 25, 2006 10:16 PM