Infinite Loop

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
 
J

jdlwright

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

Jim
 
M

Mike

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,525
Members
44,997
Latest member
mileyka

Latest Threads

Top