Infinite Loop

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

A reverse proxy processes requests and then redirects them to a local or
remote server. However, when an HttpWebRequest is created and its Uri is the
local server (same machine), I get into an infinite loop situation, since
the reverse proxy continues to process the same request over and over. What
shall I do to make sure a page is only processed once on the local machine?

Thanks.
Mike
 
Hi Mike, try comparing the ResponseUri in the response to see if it's
different?

Jim
 
I did some more browsing and I think I found a way:

I add a header in the first request (HttpWebRequest), then in the
"ProcessRequest" of my handler, I use the following. Seems to work...
If Not context.Request.Headers("UBPReverseProxy") Is Nothing Then

context.RewritePath("~/Default3.aspx")

Dim h As IHttpHandler =
PageParser.GetCompiledPageInstance("~/Default3.aspx", Nothing, context)

h.ProcessRequest(context)

Return

End If


Does it make sense?

Mike
 
Back
Top