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.
eelguetaAsked:
Who is Participating?
 
PAQ_ManCommented:
Question Closed, 500 points refunded.
PAQ_Man
Community Support Moderator
0
 
fritz_the_blankCommented:
What may be happening is that your script is timing out.

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("YourDatabase.mdb")
set objConnection=Server.CreateObject("ADODB.Connection")
strConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;"_
       + " Data Source= " & strDataPath & ";"_
       + " Mode=Share Deny None;User Id=admin;PASSWORD=;"

objConnection.ConnectionTimeout = 15      '<----------------------------------------------------this value
objConnection.CommandTimeout =  10     '<----------------------------------------------------this value
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
0
 
eelguetaAuthor Commented:
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.
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
eelguetaAuthor Commented:
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.connection")      
   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
0
 
fritz_the_blankCommented:
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
0
 
eelguetaAuthor Commented:
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
%>
0
 
fritz_the_blankCommented:
I never thought of that--I have response.buffer=true on every one of my pages!

FtB
0
 
fritz_the_blankCommented:
That's fine with me. And since I was the only one posting here, this question is ready to go.

FtB
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.