response.redirect & server.transfer very slow

Discussion in 'ASP General' started by wizard04, Feb 10, 2006.

  1. wizard04

    wizard04 Guest

    On my WinXP machine, with both IE6 and Firefox 1.0, response.redirect
    and server.transfer take about a minute. But on my WinNT machine with
    IE5.5, it works instantly. What's going on?
     
    wizard04, Feb 10, 2006
    #1
    1. Advertising

  2. wizard04

    MikeR Guest

    wizard04 wrote:
    > On my WinXP machine, with both IE6 and Firefox 1.0, response.redirect
    > and server.transfer take about a minute. But on my WinNT machine with
    > IE5.5, it works instantly. What's going on?
    >

    I don't know if it would be a factor, but Firefox is at version 1.5.0.1
    MikeR
     
    MikeR, Feb 11, 2006
    #2
    1. Advertising

  3. wizard04

    Evertjan. Guest

    MikeR wrote on 11 feb 2006 in microsoft.public.inetserver.asp.general:
    > wizard04 wrote:
    >> On my WinXP machine, with both IE6 and Firefox 1.0, response.redirect
    >> and server.transfer take about a minute. But on my WinNT machine with
    >> IE5.5, it works instantly. What's going on?
    >>

    > I don't know if it would be a factor, but Firefox is at version 1.5.0.1
    > MikeR
    >


    server.transfer is a serverside action, this cannot introduce any
    clientside browser depending problem.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Feb 11, 2006
    #3
  4. "wizard04" <> wrote in message
    news:...
    > On my WinXP machine, with both IE6 and Firefox 1.0, response.redirect
    > and server.transfer take about a minute. But on my WinNT machine with
    > IE5.5, it works instantly. What's going on?
    >


    The trick Server.transfer performs, is 'passing' the session context and
    casting it back. So, what are you storing in the session?
     
    Egbert Nierop \(MVP for IIS\), Feb 12, 2006
    #4
  5. wizard04

    wizard04 Guest

    I'm just trying to redirect the page when I cancel a form. Here's the
    code, basically:

    <%
    addMode = request.querystring("mode")
    if addMode = "doadd" then
    if request.form("submit1") = "Cancel" then
    response.clear()
    server.redirect("admin_members.asp")
    end if
    ...
    end if
    %>

    <form action="admin_members_add.asp?mode=doadd" method="post"
    id="form1" name="form1">
    <input type="text" ...>
    ...
    <input type="submit" value="Add Member" id="submit1"
    name="submit1">
    <input type="submit" value="Cancel" id="submit1" name="submit1">
    </form>
     
    wizard04, Feb 13, 2006
    #5
  6. Put a question in the body of your message

    wizard04 wrote:
    > I'm just trying to redirect the page when I cancel a form. Here's the
    > code, basically:
    >
    > <%
    > addMode = request.querystring("mode")
    > if addMode = "doadd" then
    > if request.form("submit1") = "Cancel" then
    > response.clear()
    > server.redirect("admin_members.asp")
    > end if
    > ...
    > end if
    > %>
    >
    > <form action="admin_members_add.asp?mode=doadd" method="post"
    > id="form1" name="form1">
    > <input type="text" ...>
    > ...
    > <input type="submit" value="Add Member" id="submit1"
    > name="submit1">
    > <input type="submit" value="Cancel" id="submit1" name="submit1">
    > </form>


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Feb 13, 2006
    #6
  7. wizard04

    Evertjan. Guest

    wizard04 wrote on 13 feb 2006 in microsoft.public.inetserver.asp.general:

    > server.redirect("admin_members.asp")
    >


    server.redirect ???

    I know only:

    response.redirect

    [which sends a header to the browser
    advising the browser to load another page,
    possibly on another domain altogether]

    and

    server.transfer

    [continueing the asp processing of the file
    on another file on the server,
    regardless of even the browser being in existence]

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
     
    Evertjan., Feb 13, 2006
    #7
  8. wizard04

    wizard04 Guest

    Sorry - I meant server.transfer (though I've tried response.redirect
    too)

    Evertjan. wrote:
    > wizard04 wrote on 13 feb 2006 in microsoft.public.inetserver.asp.general:
    >
    > > server.redirect("admin_members.asp")
    > >

    >
    > server.redirect ???
    >
    > I know only:
    >
    > response.redirect
    >
    > [which sends a header to the browser
    > advising the browser to load another page,
    > possibly on another domain altogether]
    >
    > and
    >
    > server.transfer
    >
    > [continueing the asp processing of the file
    > on another file on the server,
    > regardless of even the browser being in existence]
    >
    > --
    > Evertjan.
    > The Netherlands.
    > (Please change the x'es to dots in my emailaddress)
     
    wizard04, Feb 13, 2006
    #8
  9. wizard04 wrote:
    > response.clear()


    I can only think of bad reasons to use this. If a decision may result in
    redirection, then make that decision before putting anything in the buffer.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Feb 13, 2006
    #9
  10. wizard04

    wizard04 Guest

    That makes sense; I've fixed that. However, this does not solve my
    problem.
     
    wizard04, Feb 13, 2006
    #10
  11. wizard04 wrote:
    > That makes sense; I've fixed that. However, this does not solve my
    > problem.


    I don't think you have made your problem clear.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Feb 13, 2006
    #11
  12. wizard04

    wizard04 Guest

    On the WinNT computer, when I click Cancel on the form, it goes
    directly to admin_members.asp.
    On the WinXP computer, when I click Cancel on the form, it takes about
    a minute to go to admin_members.asp.

    Why, and how can it be fixed?
     
    wizard04, Feb 14, 2006
    #12
  13. wizard04 wrote:
    > On the WinNT computer, when I click Cancel on the form,
    > it goes directly to admin_members.asp.
    > On the WinXP computer, when I click Cancel on the form,
    > it takes about a minute to go to admin_members.asp.


    1. Are you talking about the client machine or server when you specify the
    OS?
    2. Do you experience the same behavior with different browsers?
    3. What kind of cache control are you using?
    4. What are the behavioral differences when you switch between
    Server.Transfer() and Response.Redirect()?
    5. What kind of performance lag do you get if you go directly to the
    redirect target?


    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Feb 14, 2006
    #13
  14. wizard04

    wizard04 Guest

    1. Client OS
    2. Unfortunately, I don't have the ability to test with the same
    browser on the different machines (I don't have installation
    privileges). On the WinXP machine, I have tried IE 6.0 and Firefox
    1.0.7, both having the lag. On the WinNT machine, I've tried IE 5.5,
    which doesn't have the lag.
    3. I don't know - how would I determine that?
    4. Both have the same behavior.
    5. No lag
     
    wizard04, Feb 14, 2006
    #14
  15. "wizard04" <> wrote in message
    news:...
    > 1. Client OS
    > 2. Unfortunately, I don't have the ability to test with the same
    > browser on the different machines (I don't have installation
    > privileges). On the WinXP machine, I have tried IE 6.0 and Firefox
    > 1.0.7, both having the lag. On the WinNT machine, I've tried IE 5.5,
    > which doesn't have the lag.
    > 3. I don't know - how would I determine that?
    > 4. Both have the same behavior.
    > 5. No lag
    >


    is
    admin_members.asp
    doing some database operation that the parent page opens as well? This could
    be a database record lock.

    Server.Transfer is typically executing two pages at a time, while redirect
    would first cause the first page to be garbage collected (including closing
    open records).

    If a database is used, be sure to use ADO in such a way that you use a
    client-side cursur.

    rs.cursorlocation = adUseClient
     
    Egbert Nierop \(MVP for IIS\), Feb 17, 2006
    #15
  16. wizard04

    wizard04 Guest

    I've made a couple very simple test pages with no database operations
    at http://www.tecom.usmc.mil/cce/A.asp

    I get the lag when clicking either Submit or Cancel on my WinXP
    machine, but it works fine on my WinNT machine.

    A.asp has only HTML

    B.asp has the following VBScript at the top, before <html>:
    <%
    if Request.Form("subm") = "Cancel" then
    'server.Transfer("A.asp")
    response.Redirect("A.asp")
    elseif request.Form("subm") = "Submit" then
    response.Write("<a href=""A.asp"">Back to test page A</a>")
    response.End()
    end if
    %>

    Any insights?
     
    wizard04, Feb 17, 2006
    #16
  17. wizard04 wrote:
    > Any insights?


    Yes. Your failure to quote motivated me to drop out of the thread.

    Also, you could write something and flush the buffer at the end of the first
    and beginning of the second. This may be illustrative. Furthermore, you
    could see exactly what is happening by examining the HTTP headers.



    --
    Dave Anderson

    Unsolicited commercial email will be read at a cost of $500 per message. Use
    of this email address implies consent to these terms. Please do not contact
    me directly or ask me to contact you directly for assistance. If your
    question is worth asking, it's worth posting.
     
    Dave Anderson, Feb 17, 2006
    #17
    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. Justin
    Replies:
    3
    Views:
    544
    Cowboy \(Gregory A. Beamer\)
    Jul 31, 2003
  2. Harsh Thakur

    Response.Redirect vs Server.Transfer

    Harsh Thakur, Aug 18, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    778
    Harsh Thakur
    Aug 18, 2003
  3. yma
    Replies:
    2
    Views:
    427
    Kevin Spencer
    Dec 4, 2003
  4. Sal
    Replies:
    1
    Views:
    570
  5. David C. Holley

    server.execute/response.redirect/server.transfer

    David C. Holley, Jan 17, 2004, in forum: ASP General
    Replies:
    6
    Views:
    440
    David Holley
    Jan 18, 2004
Loading...

Share This Page