Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

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.
0
eelgueta
Asked:
eelgueta
  • 4
  • 3
1 Solution
 
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
 
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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
 
PAQ_ManCommented:
Question Closed, 500 points refunded.
PAQ_Man
Community Support Moderator
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now