4

I have written an .ashx http handler. I also have a custom http handler which I added to the web.config file:

<httpHandlers>
    <add verb="*" path="*.aspx" type="AspxHandler"/>
</httpHandlers>

and I want the call to go to my custom http handler before it goes to the ashx http handler.

How can I do that?

1 Answer 1

2

Handlers in ASP.NET are endpoints, so there can be only one per request. You can t really do something and then pass it along. If you want your handler to run instead of the regular page handler then first remove the default ASPX handler and then add yours. See MSDN for the config file schema.

If you want to just run something before a handler and possible affect which handler runs, you need to implement an IHttpModule

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.