[Mono-dev] Patch for HttpRuntime and HttpServerUtility to bring API in sync with .NET 2.0 SP2

Gonzalo Paniagua Javier gonzalo.mono at gmail.com
Tue Sep 29 17:19:46 EDT 2009

On Tue, 2009-09-29 at 17:07 -0400, Nick Berardi wrote:
> Hi guys,
> I looked in to this more and there are a couple issues that popped up
> when trying to implement the following method:
> public void TransferRequest(string path, bool preserveForm, string
> method, NameValueCollection headers)
> My major hurdle that I wasn't able to over come is the following,
> probably because I don't know how the actual server was implemented.
> TransferRequest is suppose to kick off a new request in the
> application life cycle, which means that it needs to create a new
> request which runs all the way through from BeginRequest to EndRequest
> in the HttpApplication, after it has killed off the current request. 
> I don't know how I can do this in the Mono code base, because
> everytime I called Response.End() the request was transmitted back to
> the client.  Which is by design of Response.End(), however I need a
> way to end the current request life cycle and start a new one giving
> the path, headers, method, and content body, and not have it transmit
> back to the client until this second request is done.

Take a look at HttpServerUtility.cs. It already has the 2.0 and 1.x
methods to transfer a request in place. As for the events, if you are
sure that all of them are executed in the new request, you could create
an internal method in HttpRuntime that takes the HttpWorkerRequest
object of the current request and calls 'Process (httpworkerrequest)'
and then do a Response.End ().


More information about the Mono-devel-list mailing list