Andrew Waycott
02-27-1999, 04:15 PM
I have an IIS 4.0 server running ASP 2 (VBScript) code. When I run the below code from two different clients at the same time, they run one at a time instead of simultaneously. Is there a way to make IIS and ASP work so that both instances of the code run at the same time? Please note that this is just test code and that the same thing happens when I run any code that takes a long time to run like code that calls a stored procedure on a SQL server.
Andrew
==============================
<%option explicit%>
<%
Dim GlobalSeconds
GlobalSeconds=10
Response.write "<br>Start: <br>"
Response.write now()
Call Timer(GlobalSeconds)
Response.Write "<br>Expire timeout:<br>"
Response.write now
Sub Timer(LocalSeconds)
Dim StartDate
Dim CurrentDate
Dim Counter
Dim I
Dim MultiplyFactor
MultiplyFactor=2000 ' 1 second
StartDate=Now
While I< (LocalSeconds*MultiplyFactor*2)
I = I + 1
For Counter = 1 to 1000
Next
CurrentDate=Now
If Datediff("s", StartDate, CurrentDate)> (LocalSeconds-1) Then
I=(LocalSeconds*MultiplyFactor*2)
End If
Wend
End Sub
%>
Andrew
==============================
<%option explicit%>
<%
Dim GlobalSeconds
GlobalSeconds=10
Response.write "<br>Start: <br>"
Response.write now()
Call Timer(GlobalSeconds)
Response.Write "<br>Expire timeout:<br>"
Response.write now
Sub Timer(LocalSeconds)
Dim StartDate
Dim CurrentDate
Dim Counter
Dim I
Dim MultiplyFactor
MultiplyFactor=2000 ' 1 second
StartDate=Now
While I< (LocalSeconds*MultiplyFactor*2)
I = I + 1
For Counter = 1 to 1000
Next
CurrentDate=Now
If Datediff("s", StartDate, CurrentDate)> (LocalSeconds-1) Then
I=(LocalSeconds*MultiplyFactor*2)
End If
Wend
End Sub
%>