eelgueta
asked on
Authentication pop-up with large response (IIS 6.0/Win2003)
Hi All,
I have a simple ASP app that request some filter parameters and performs a database query with them, returning a HTML table filled with the retrieved data.
In IIS 5.0 (Win2000) everything worked ok. After I copied these scripts to IIS 6.0 (Win2003) when I request the whole data set (3,409 records) I get an authentication pop-up. If I request fewer records (1,000, for instance) the page works ok. In IIS 5.0 the page works no matter the response size (partial or full).
The page with the full resultset is 2138.85 KB.
TIA,
Ed.
I have a simple ASP app that request some filter parameters and performs a database query with them, returning a HTML table filled with the retrieved data.
In IIS 5.0 (Win2000) everything worked ok. After I copied these scripts to IIS 6.0 (Win2003) when I request the whole data set (3,409 records) I get an authentication pop-up. If I request fewer records (1,000, for instance) the page works ok. In IIS 5.0 the page works no matter the response size (partial or full).
The page with the full resultset is 2138.85 KB.
TIA,
Ed.
ASKER
FtB,
Thank you for your answer, but that's no the problem. In fact, the authentication window pops up almost instantaneously.
Anyway, I applied your recommendation, but nothing changed.
BTW, the db server is MS SQL Server 2000, and I'm using a DSN.
Ed.
Thank you for your answer, but that's no the problem. In fact, the authentication window pops up almost instantaneously.
Anyway, I applied your recommendation, but nothing changed.
BTW, the db server is MS SQL Server 2000, and I'm using a DSN.
Ed.
ASKER
I forgot to mention the db server is in another machine, so I'm including a fixed user name and password in the connection string:
set con = server.createobject("ADODB .connectio n")
con.Mode = 3
con.ConnectionTimeout = 15
con.CommandTimeout = 10
con.Open "DSN=mydsn;User Id=test;Password=test;"
I found out the authentication pop-up appears only with more than 1,102 records. This works:
Do Until rs.EOF or cnt = 1102
This doesn't worK:
Do Until rs.EOF or cnt = 1103
My loop is like this:
cnt = 0
Do Until rs.EOF or cuenta = 1102
:
:
rs.MoveNext
cnt = cnt + 1
Loop
set con = server.createobject("ADODB
con.Mode = 3
con.ConnectionTimeout = 15
con.CommandTimeout = 10
con.Open "DSN=mydsn;User Id=test;Password=test;"
I found out the authentication pop-up appears only with more than 1,102 records. This works:
Do Until rs.EOF or cnt = 1102
This doesn't worK:
Do Until rs.EOF or cnt = 1103
My loop is like this:
cnt = 0
Do Until rs.EOF or cuenta = 1102
:
:
rs.MoveNext
cnt = cnt + 1
Loop
That is truly strange....
I suppose if you have the databse locally, it works fine? I wonder if the authentication challenge comes from SQL Server or from the remote server.
FtB
I suppose if you have the databse locally, it works fine? I wonder if the authentication challenge comes from SQL Server or from the remote server.
FtB
ASKER
Eureka!!!
Adding buffering everything works Ok:
<%
Response.Buffer = True
cnt = 0
Do Until rs.EOF or cuenta = 1102
:
:
rs.MoveNext
cnt = cnt + 1
if cnt mod 1000 = 0 then
Response.Flush
end if
Loop
Response.End
%>
Adding buffering everything works Ok:
<%
Response.Buffer = True
cnt = 0
Do Until rs.EOF or cuenta = 1102
:
:
rs.MoveNext
cnt = cnt + 1
if cnt mod 1000 = 0 then
Response.Flush
end if
Loop
Response.End
%>
I never thought of that--I have response.buffer=true on every one of my pages!
FtB
FtB
That's fine with me. And since I was the only one posting here, this question is ready to go.
FtB
FtB
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
1) Set a longer time out on your connection object
2) Set an explicit script timeout on your page
1)
dim strDataPath, objConnection
strDataPath = SErver.MapPath("YourDataba
set objConnection=Server.Creat
strConnectString = "Provider=Microsoft.Jet.OL
+ " Data Source= " & strDataPath & ";"_
+ " Mode=Share Deny None;User Id=admin;PASSWORD=;"
objConnection.ConnectionTi
objConnection.CommandTimeo
objConnection.Mode = 3 'adModeReadWrite
if objConnection.state = 0 then
objConnection.Open strConnectString
end if
2) place this at the top of your page (value in milliseconds):
Server.ScriptTimeout = 2500
FtB