response.redirect & server.transfer very slow

W

wizard04

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?
 
M

MikeR

wizard04 said:
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
 
E

Evertjan.

MikeR wrote on 11 feb 2006 in microsoft.public.inetserver.asp.general:
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.
 
E

Egbert Nierop \(MVP for IIS\)

wizard04 said:
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?
 
W

wizard04

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>
 
D

Dave Anderson

wizard04 said:
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.
 
E

Evertjan.

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]
 
W

wizard04

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

Evertjan. said:
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]
 
D

Dave Anderson

wizard04 said:
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.
 
D

Dave Anderson

wizard04 said:
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.
 
W

wizard04

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?
 
D

Dave Anderson

wizard04 said:
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.
 
W

wizard04

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
 
E

Egbert Nierop \(MVP for IIS\)

wizard04 said:
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
 
W

wizard04

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?
 
D

Dave Anderson

wizard04 said:
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.
 

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,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top