Click to See Complete Forum and Search --> : PWS counts too many users on my computer
Sastraxi
May 6th, 2001, 05:17 PM
I know for a fact that there are no other users on my website but there are always 2 or 3 users connected. In addition, this (or something else) causes me not be able to view my website. I have tried rebooting, starting/pausing/stopping PWS, but nothing works.
Help!
msdnexpert
May 6th, 2001, 10:59 PM
Well Sastraxi how do u know the number of users who are connected.
monte96
May 6th, 2001, 11:32 PM
Each time you connect with a new copy of IE, it is a new session and therefore a new user to the server because the memory cookie that is used to track the session ID is not present the first time you connect to the server and create a session.
JoshT
May 7th, 2001, 09:01 AM
Couldn't downloading the page and a couple of images simultaneously open multiple connections?
monte96
May 7th, 2001, 10:41 AM
If he is caching images, absolutely.
Sastraxi
May 7th, 2001, 03:14 PM
I think it has to do with this ASP page, it connects all those users and freezes PWS every access.
Here it is:
<!-- #INCLUDE FILE="adovbs.inc"-->
<%
dim SC
Dim oConn
Dim oRec
Dim UsrName
Dim ERRORS
Response.Buffer=true
Response.Write "<HTML><HEAD><TITLE>Attempting Server-AddUser for " + request.Form("User") + "</TITLE></HEAD><BODY>"
SC = " Driver={Microsoft Access Driver (*.mdb)};DBQ=" + server.MapPath("data.mdb")
Set oRec = Server.CreateObject("ADODB.Recordset")
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open SC, "Admin", "MY_PASSWORD_DONT_WORRY_ITS_CORRECT!!!"
oRec.Open "Users", oConn,adOpenStatic,adLockOptimistic,adCmdTable
'<--- CHECK FOR ALL NECESSARY INFORMATION
Response.Write "<FONT COLOR='#FF0000'>"
If Trim(Request.Form("User")) = "" Then
Response.Write "No username provided.<BR>"
ERRORS = true
End If
If Trim(Request.Form("Email")) = "" Then
Response.Write "No email account provided.<BR>"
ERRORS = true
end if
if Trim(Request.Form("Pword")) = "" Then
Response.Write "No password provided!<BR>"
ERRORS = true
elseif len(trim(request.form("pword"))) > 12 then
Response.Write "Password cannot excede 12 alphanumeric characters.<BR>"
ERRORS = true
elseif ucase(trim(Request.Form("pword"))) <> ucase(trim(Request.Form("p2word"))) then
Response.Write "Passwords do not match.<BR>"
ERRORS = true
end if
if Trim(Request.Form("GName")) = "" Then
Response.Write "You didn't include your first name!<BR>"
ERRORS = true
end if
if Trim(Request.Form("SName")) = "" Then
Response.Write "You didn't include your last name!<BR>"
ERRORS = true
end if
While Not oRec.EOF
UsrName=oRec("UserName")
If UsrName=Request.Form("User") Then
Response.Write "Somebody has already chosen <i>" + UsrName + "</i> as their username. Please click the back button and choose a different name."
ERRORS = true
Else
End if
'Response.Redirect "loggedin.asp?usernm=" + NMME
Wend
if ERRORS = TRUE then
Response.Write "<BR><B>There were errors. Please press the back button on your browser to make the necessary changes.</B>"
end if
Response.Write "</FONT>"
Response.End
'<---
'<--- WE'VE MADE CONTACT, ADO STUFF NEXT...
While Not oRec.EOF
UsrName=oRec("UserName")
If UsrName=Request.Form("User") Then
'Response.Redirect ".htm"
'Response.End
Else
End if
'Response.Redirect "loggedin.asp?usernm=" + NMME
Wend
'<--- IF WE GET HERE, EOUSTON, WE ARE GOOD TO GO
'<--- Provided unique username...
Response.Write "Provided unique username, writing data..."
Dim A
Dim B
A = Timer()
oRec.AddNew
oRec("UserName") = Trim(Request.Form("User"))
oRec("Password") = Trim(Request.Form("Pword"))
oRec("Email Address") = Trim(Request.Form("Email"))
If Trim(Request.Form("ICQ")) <> "" then oRec("ICQ") = Trim(Request.Form("ICQ"))
oRec("Given Name") = Trim(Request.Form("GName"))
oRec("Surname") = Trim(Request.Form("SName"))
If Trim(Request.Form("website")) <> "" then oRec("Website") = Trim(Request.Form("Website"))
If Trim(Request.Form("comment")) <> "" then oRec("Comments") = Trim(Request.Form("comment"))
B = Timer()
Response.Write "Done.<BR>"
Response.Write "ADDUSER.ASP - " + (B - A / 1000) + " seconds for Query User.ADDUSER, Username " + oRec("UserName") + " on " + Now() + "<BR>"
Response.Write "</BODY></HTML>"
%>
Are there any forever loops in there?
Sastraxi
May 7th, 2001, 03:20 PM
After posting that I noticed a TON of errors in my code and I fixed them, just going to check if it works now.
Sastraxi
May 7th, 2001, 03:31 PM
It works and PWS doesn't lock up anymore!
Thanks!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.