Infinite Loop

Discussion in 'ASP .Net' started by Mike, Oct 5, 2007.

  1. Mike

    Mike Guest

    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
    Mike, Oct 5, 2007
    #1
    1. Advertising

  2. Mike

    Guest

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

    Jim

    On Oct 4, 7:31 pm, "Mike" <> wrote:
    > 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
    , Oct 5, 2007
    #2
    1. Advertising

  3. Mike

    Mike Guest

    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



    <> schrieb im Newsbeitrag
    news:...
    > Hi Mike, try comparing the ResponseUri in the response to see if it's
    > different?
    >
    > Jim
    >
    > On Oct 4, 7:31 pm, "Mike" <> wrote:
    >> 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

    >
    >
    Mike, Oct 5, 2007
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Vedran Vukotic

    infinite loop unexpectly dies

    Vedran Vukotic, Mar 2, 2006, in forum: Perl
    Replies:
    0
    Views:
    4,460
    Vedran Vukotic
    Mar 2, 2006
  2. Alexander Bosch

    Infinite loop when using Server.Transfer

    Alexander Bosch, Oct 28, 2004, in forum: ASP .Net
    Replies:
    11
    Views:
    878
    Steven Cheng[MSFT]
    Nov 10, 2004
  3. Alexander Bosch

    Infinite loop when using Server.Transfer

    Alexander Bosch, Oct 31, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    544
    Steven Cheng[MSFT]
    Nov 1, 2004
  4. Replies:
    5
    Views:
    595
    benben
    Jan 31, 2006
  5. Isaac Won
    Replies:
    9
    Views:
    364
    Ulrich Eckhardt
    Mar 4, 2013
Loading...

Share This Page