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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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.
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
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

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

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

FtB
PAQ_ManCommented:
Question Closed, 500 points refunded.
PAQ_Man
Community Support Moderator

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.