G
Geoff Winsor
Hi,
I am experiencing a problem with recalling a session variable which stores
whether a person is logged in to a "members only" section of a website. This
area of the site has been working flawlessly for a couple of years under
Windows 2000 server but now is very inconsistent following a recent upgrade
to Windows server 2003. Following a login, the login info is passed to this
asp page that checks an Access database for the user name and password:
SET DbObject = Server.CreateObject ("ADODB.Connection")
DbObject.Open "DSN=pseudoCAP1;UID=;PWD="
set rs = server.createobject("adodb.recordset")
SET Rs = DbObject.Execute (SQL)
If Rs.EOF Then
Session("Authenticated") = 0
Response.Redirect ("unsuccessfulLogin.htm")
Else
Session("Authenticated") = 1
Session("user") = Request.Form("username")
End If
rs.close
set rs = nothing
DbObject.Close
set DbObject = nothing
response.redirect "main.asp"
If a correct password and username is provided, the user is always forwarded
to the main.asp member start page. I included a snippet of code while
troubleshooting to print the value of the authentication session variable
in the browser window to see if it was set (1=logged in, 0= not logged in).
However about 50% of the time, the following error occurs with our access
database and Authentication session variable is output as = 0:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
C:\INETPUB\WWWROOT\SUBMISSIONS\../include/functions.inc, line 4
The way that this page is written though, even if the record was not present
(although it is when I open the database), the authentication should still
be set to 1. Refreshing the main.asp page will often eliminate the ADODB
error above and the session variable value of 1 will be returned.
The rest of the time, authentication is OK and a value of 1 is output.
However when the user goes to another page requiring authentication, they
are redirected back to the login.html page because the authentication
variable is once again set as zero!
Could this be an IIS 6.0 specific problem (I do have session state enabled
at default value of 20 min) ??
Or could there be some permissions problem related to a specific file (I
have checked the database as well as the related files and they all seem
OK)?
Thanks,
Geoff
I am experiencing a problem with recalling a session variable which stores
whether a person is logged in to a "members only" section of a website. This
area of the site has been working flawlessly for a couple of years under
Windows 2000 server but now is very inconsistent following a recent upgrade
to Windows server 2003. Following a login, the login info is passed to this
asp page that checks an Access database for the user name and password:
SET DbObject = Server.CreateObject ("ADODB.Connection")
DbObject.Open "DSN=pseudoCAP1;UID=;PWD="
set rs = server.createobject("adodb.recordset")
SET Rs = DbObject.Execute (SQL)
If Rs.EOF Then
Session("Authenticated") = 0
Response.Redirect ("unsuccessfulLogin.htm")
Else
Session("Authenticated") = 1
Session("user") = Request.Form("username")
End If
rs.close
set rs = nothing
DbObject.Close
set DbObject = nothing
response.redirect "main.asp"
If a correct password and username is provided, the user is always forwarded
to the main.asp member start page. I included a snippet of code while
troubleshooting to print the value of the authentication session variable
in the browser window to see if it was set (1=logged in, 0= not logged in).
However about 50% of the time, the following error occurs with our access
database and Authentication session variable is output as = 0:
ADODB.Field error '800a0bcd'
Either BOF or EOF is True, or the current record has been deleted. Requested
operation requires a current record.
C:\INETPUB\WWWROOT\SUBMISSIONS\../include/functions.inc, line 4
The way that this page is written though, even if the record was not present
(although it is when I open the database), the authentication should still
be set to 1. Refreshing the main.asp page will often eliminate the ADODB
error above and the session variable value of 1 will be returned.
The rest of the time, authentication is OK and a value of 1 is output.
However when the user goes to another page requiring authentication, they
are redirected back to the login.html page because the authentication
variable is once again set as zero!
Could this be an IIS 6.0 specific problem (I do have session state enabled
at default value of 20 min) ??
Or could there be some permissions problem related to a specific file (I
have checked the database as well as the related files and they all seem
OK)?
Thanks,
Geoff