Generic HTTP Handler in ASP.Net

Posted by Bruno Brant on Stack Overflow See other posts from Stack Overflow or by Bruno Brant
Published on 2010-06-16T20:03:24Z Indexed on 2010/06/16 21:42 UTC
Read the original article Hit count: 503

Filed under:
|
|

Hello all,

I want to write a custom HTTP Handler in ASP.Net (I'm using C# currently) that filters all requests to, say, .aspx files, and then, depending on the page name that comes with the requests, I redirect the user to a page.

So far, I've written a handler that filter "*", that is, everything. Let's say I receive a request for "Page.aspx", and want to send the user to "AnotherPage.aspx". So I call Redirect on that response and pass "AnotherPage.aspx" as the new page. The problem is that this will once more trigger my handler, which will do nothing. This will leave the user without any response.

So, is there a way to send the request to the other handlers (cascade the message) once I've dealt with it?

Thanks, Bruno

© Stack Overflow or respective owner

Related posts about c#

Related posts about ASP.NET