All,
I have constructed an html login page to be used with an online mapping tool with the help of a programmer. Login.htm uses an ASP page called Authenticate.asp to identify the username and password typed into the html page. How does it do this? It opens a recordset, using SQL and compares it against an Access 2000 database with all the valid usernames and passwords. What's the problem you may ask? Well, a successful login is inconsistent. I can login the first time with ease, but if I do a back or refresh the page in IE 6, type in another valid username and password and I get a white page back with:
Error Type:
Provider (0x80004005)
Unspecified error
/website/authenticate.asp, line 47
I've gone through the Microsoft support site and this error type is not documented. This error even occurs when I type in a wrong username and password. Here is the code, html with asp embedded for all to look at and see if there is something that might be hanging it up.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel=stylesheet href="styles/dialog.css" type="text/css">
<title>Authenticate</title>
</head>
<body background="images/backgrnd.gif">
<center>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="90%%">
<tr>
<td VALIGN=TOP ALIGN=LEFT width="30%%"><img src="images/aar_logo_large.gif"></td>
<td VALIGN=BOTTOM ALIGN=CENTER><p align="center">
<font SIZE=5 COLOR="#000080" face="Times New Roman"><b>AAR Ribbon License</b></font></td>
<td VALIGN=TOP ALIGN=RIGHT width="30%%"><img src="images/small_ttci_logo.gif"></td>
</tr>
</table>
<img src="images/space.gif" width="500" height="100">
<%
username = ""
password = ""
if Not IsEmpty(Request.Form("username"
) then username = Request.Form("username"
if Not IsEmpty(Request.Form("password"
) then password = Request.Form("password"
%>
<%
Set cn = Server.CreateObject("ADODB.Connection"
cn.ConnectionTimeout = 15
cn.CommandTimeout = 30
cn.Open "DSN=AAR;DATABASE=aar;APP=ASP script"
Set SQLStmt = Server.CreateObject("ADODB.Command"
Set RS = Server.CreateObject("ADODB.Recordset"
SQLStmt.CommandText = "select * from users " & _
"where username='" & CStr(username) & "' and " & _
" password='" & CStr(password) & "'"
SQLStmt.CommandType = 1
Set SQLStmt.ActiveConnection = cn
RS.Open SQLStmt
if Not RS.EOF then %>
<%=RS("username"
%> exists!
<% else %>
<form action="login.htm" method="get">
<table border="0" width="400" class="dlgframe" cellspacing="0" cellpadding="0" bgcolor="#C0C0C0">
<tr class="dlgcaption"><td colspan="4"> Invalid Login</td></tr>
<tr><td rowspan="8" width="4"> </td>
<td colspan=2><img src="images/space.gif" height="8" width="1"></td>
<td rowspan="8" width="4"> </td>
</tr>
<tr>
<td align="left" rowspan=3 valign="top" width="40"><img src="images/iexclam.gif"></td>
<td align="left" class="dlglabel">The username "<%=username%>" doesn't
exist in the AAR Ribbon license system or you gave an incorrect password!</td>
</tr>
<tr><td colspan="2" height=4><img src="images/space.gif" width="1" height="15"></tr>
<tr>
<td align="left" class="dlglabel">You must enter a valid username and password!</td>
</tr>
<tr><td colspan="2" height=4><img src="images/space.gif" width="1" height="5"></td>
</tr>
<tr>
<td colspan=2 align="center">
<input type="submit" name="SUBMIT" value="OK" style="width: 80;">
</td>
</tr>
<tr><td colspan="2" height="4"></td></tr>
</table>
</form>
<% end if %>
<%
cn.Close
Set cn = Nothing
%>
</table>
<table border="0" width="598" cellspacing="0" cellpadding="0">
<tr><td><img src="images/space.gif" height="200"></td></tr>
<tr><td align="center"><font size=2 face="Times Roman"><i>
© 2002 ARINC Incorporated. All rights reserved.
</i></font>
</td>
</tr>
</table>
<center>
<p></p>
</body>
</html>
I have constructed an html login page to be used with an online mapping tool with the help of a programmer. Login.htm uses an ASP page called Authenticate.asp to identify the username and password typed into the html page. How does it do this? It opens a recordset, using SQL and compares it against an Access 2000 database with all the valid usernames and passwords. What's the problem you may ask? Well, a successful login is inconsistent. I can login the first time with ease, but if I do a back or refresh the page in IE 6, type in another valid username and password and I get a white page back with:
Error Type:
Provider (0x80004005)
Unspecified error
/website/authenticate.asp, line 47
I've gone through the Microsoft support site and this error type is not documented. This error even occurs when I type in a wrong username and password. Here is the code, html with asp embedded for all to look at and see if there is something that might be hanging it up.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<link rel=stylesheet href="styles/dialog.css" type="text/css">
<title>Authenticate</title>
</head>
<body background="images/backgrnd.gif">
<center>
<table BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH="90%%">
<tr>
<td VALIGN=TOP ALIGN=LEFT width="30%%"><img src="images/aar_logo_large.gif"></td>
<td VALIGN=BOTTOM ALIGN=CENTER><p align="center">
<font SIZE=5 COLOR="#000080" face="Times New Roman"><b>AAR Ribbon License</b></font></td>
<td VALIGN=TOP ALIGN=RIGHT width="30%%"><img src="images/small_ttci_logo.gif"></td>
</tr>
</table>
<img src="images/space.gif" width="500" height="100">
<%
username = ""
password = ""
if Not IsEmpty(Request.Form("username"
if Not IsEmpty(Request.Form("password"
%>
<%
Set cn = Server.CreateObject("ADODB.Connection"
cn.ConnectionTimeout = 15
cn.CommandTimeout = 30
cn.Open "DSN=AAR;DATABASE=aar;APP=ASP script"
Set SQLStmt = Server.CreateObject("ADODB.Command"
Set RS = Server.CreateObject("ADODB.Recordset"
SQLStmt.CommandText = "select * from users " & _
"where username='" & CStr(username) & "' and " & _
" password='" & CStr(password) & "'"
SQLStmt.CommandType = 1
Set SQLStmt.ActiveConnection = cn
RS.Open SQLStmt
if Not RS.EOF then %>
<%=RS("username"
<% else %>
<form action="login.htm" method="get">
<table border="0" width="400" class="dlgframe" cellspacing="0" cellpadding="0" bgcolor="#C0C0C0">
<tr class="dlgcaption"><td colspan="4"> Invalid Login</td></tr>
<tr><td rowspan="8" width="4"> </td>
<td colspan=2><img src="images/space.gif" height="8" width="1"></td>
<td rowspan="8" width="4"> </td>
</tr>
<tr>
<td align="left" rowspan=3 valign="top" width="40"><img src="images/iexclam.gif"></td>
<td align="left" class="dlglabel">The username "<%=username%>" doesn't
exist in the AAR Ribbon license system or you gave an incorrect password!</td>
</tr>
<tr><td colspan="2" height=4><img src="images/space.gif" width="1" height="15"></tr>
<tr>
<td align="left" class="dlglabel">You must enter a valid username and password!</td>
</tr>
<tr><td colspan="2" height=4><img src="images/space.gif" width="1" height="5"></td>
</tr>
<tr>
<td colspan=2 align="center">
<input type="submit" name="SUBMIT" value="OK" style="width: 80;">
</td>
</tr>
<tr><td colspan="2" height="4"></td></tr>
</table>
</form>
<% end if %>
<%
cn.Close
Set cn = Nothing
%>
</table>
<table border="0" width="598" cellspacing="0" cellpadding="0">
<tr><td><img src="images/space.gif" height="200"></td></tr>
<tr><td align="center"><font size=2 face="Times Roman"><i>
© 2002 ARINC Incorporated. All rights reserved.
</i></font>
</td>
</tr>
</table>
<center>
<p></p>
</body>
</html>