[Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1337
  • Last Modified:

Can an HTTP module do a Server.Transfer to an HTTP handler?

I've got a web.config which defines an HTTP handler, Test.ashx, which refers to the simplest possible HTTP handler.

I've got an HTTP authentication module that wants to transfer to this handler.  All I get is System.Web.HttpException: Error executing child request for /test/Test.ashx.

I am able to Server.Transfer to a .aspx page, just not to a handler.

Has anybody tried this before?  Is it possible to get this to work?  This is all with .NET 2.0.

Thanks in advance, -Mike
  • 2
1 Solution
Kumaraswamy RCommented:
Michael_BalloniAuthor Commented:
That's a very neat link!

How do you recommend that I proceed?

"Analyze web.config or System.Web.Configuration.HttpHandlersSection, find matching handler for required URI, instantiate handler and directly call ProcessRequest method."


That sounds promising.  Any advice on how to do that?  What would the code look like?

Michael_BalloniAuthor Commented:
The expert answered my question, but left it to me to figure out how to implement the solution.  It'd have been nice if another expert would have come along to finish the job, assuming that the first one wasn't going to.  I got it done, but it took longer than I would've liked it to.

Featured Post

Configuration Guide and Best Practices

Read the guide to learn how to orchestrate Data ONTAP, create application-consistent backups and enable fast recovery from NetApp storage snapshots. Version 9.5 also contains performance and scalability enhancements to meet the needs of the largest enterprise environments.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now