dondmcg
10-06-2003, 01:21 PM
I have set up a login page with asp that is password protected.
The five files : passord.asp, password.txt, engine.asp, invalid.asp and the page to be accessed urin.asp all reside in the same directory. When I log in to the password page I keep recieving the error message:
Microsoft VBScript runtime error '800a004c'
Path not found
/engine.asp, line 8
----------------------------------------------------------------------
this is my engine code :
<!--- This example is the simple engine system
<%@ LANGUAGE="VBSCRIPT" %>
<%
' Connects and opens the text file
' DATA FORMAT IN TEXT FILE= "username<SPACE>password"
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
Set MyTextFile=MyFileObject.OpenTextFile(Server.MapPath("\user\htdocs") & "\password.txt")
' Scan the text file to determine if the user is legal
WHILE NOT MyTextFile.AtEndOfStream
' If username and password found
IF MyTextFile.ReadLine = Request.form("username") & " " & Request.form("password") THEN
' Close the text file
MyTextFile.Close
' Go to login success page
Session("GoBack")=Request.ServerVariables("SCRIPT_NAME")
Response.Redirect "urin.asp"
Response.end
END IF
WEND
' Close the text file
MyTextFile.Close
' Go to error page if login unsuccessful
Session("GoBack")=Request.ServerVariables("SCRIPT_NAME")
Response.Redirect "invalid.asp"
Response.end
%> --->
----------------------------------------------------------------------
This is my password code :
<!--- This example is the simple login system
<%@ LANGUAGE="VBSCRIPT" %>
<html>
<HEAD><title>Password.asp</title>
LINK REL=STYLESHEET TYPE="text/css" HREF="css1.css"></HEAD>
<BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
<table border=0 valign=top cellpadding=0 cellspacing=0 width=100% height=100% bgcolor=#225E90>
<tr>
<td><table border=0 valign=top cellpadding=0 cellspacing=0 width=300px height=100%>
<tr>
<td width=181px bgcolor=#225E90><img src="images/spacer2.gif"></td>
<td width=119px bgcolor=white align=left valign=center><a href="webdesign.html"><font face="arial" size=1 weight=bold color=#225E90> webdesign</font></a><br><br>
<a href="wama.html"><font face="arial" size=1 weight=bold color=#225E90> animation</font></a><br><br>
<a href="password.asp"><font face="arial" size=1 weight=bold color=#225E90> directory</font></a><br><br>
<a href="contact.html"><font face="arial" size=1 weight=bold color=#225E90> contact</font></a><br><br>
<a href="index.html"><font face="arial" size=1 weight=bold color=#225E90> home</font></a><br><br></td>
</tr>
</table></td>
<td><table border=0 valign=top align=left cellpadding=0 cellspacing=10 width=500px bgcolor=#225E90>
<tr>
<td width=px height=px align=center valign=bottom>
<FORM ACTION="engine.asp" NAME="form1" METHOD="post"><TABLE bgcolor=white ALIGN=CENTER BORDER=0>
<TR>
<TD ALIGN="right">Login:</TD>
<TD><INPUT TYPE="text" NAME="username"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"></TD>
<TD><INPUT TYPE="submit" VALUE="Login"></INPUT>
<INPUT TYPE="reset" VALUE="Reset"></INPUT>
</TD>
</TR>
</TABLE>
</FORM></td>
</tr>
</table></td>
<td width=100%><img src="images/spacer2.gif"></td>
</table>
</BODY>
</html> --->
----------------------------------------------------------------------
Can anyone tell me why?
The five files : passord.asp, password.txt, engine.asp, invalid.asp and the page to be accessed urin.asp all reside in the same directory. When I log in to the password page I keep recieving the error message:
Microsoft VBScript runtime error '800a004c'
Path not found
/engine.asp, line 8
----------------------------------------------------------------------
this is my engine code :
<!--- This example is the simple engine system
<%@ LANGUAGE="VBSCRIPT" %>
<%
' Connects and opens the text file
' DATA FORMAT IN TEXT FILE= "username<SPACE>password"
Set MyFileObject=Server.CreateObject("Scripting.FileSystemObject")
Set MyTextFile=MyFileObject.OpenTextFile(Server.MapPath("\user\htdocs") & "\password.txt")
' Scan the text file to determine if the user is legal
WHILE NOT MyTextFile.AtEndOfStream
' If username and password found
IF MyTextFile.ReadLine = Request.form("username") & " " & Request.form("password") THEN
' Close the text file
MyTextFile.Close
' Go to login success page
Session("GoBack")=Request.ServerVariables("SCRIPT_NAME")
Response.Redirect "urin.asp"
Response.end
END IF
WEND
' Close the text file
MyTextFile.Close
' Go to error page if login unsuccessful
Session("GoBack")=Request.ServerVariables("SCRIPT_NAME")
Response.Redirect "invalid.asp"
Response.end
%> --->
----------------------------------------------------------------------
This is my password code :
<!--- This example is the simple login system
<%@ LANGUAGE="VBSCRIPT" %>
<html>
<HEAD><title>Password.asp</title>
LINK REL=STYLESHEET TYPE="text/css" HREF="css1.css"></HEAD>
<BODY marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
<table border=0 valign=top cellpadding=0 cellspacing=0 width=100% height=100% bgcolor=#225E90>
<tr>
<td><table border=0 valign=top cellpadding=0 cellspacing=0 width=300px height=100%>
<tr>
<td width=181px bgcolor=#225E90><img src="images/spacer2.gif"></td>
<td width=119px bgcolor=white align=left valign=center><a href="webdesign.html"><font face="arial" size=1 weight=bold color=#225E90> webdesign</font></a><br><br>
<a href="wama.html"><font face="arial" size=1 weight=bold color=#225E90> animation</font></a><br><br>
<a href="password.asp"><font face="arial" size=1 weight=bold color=#225E90> directory</font></a><br><br>
<a href="contact.html"><font face="arial" size=1 weight=bold color=#225E90> contact</font></a><br><br>
<a href="index.html"><font face="arial" size=1 weight=bold color=#225E90> home</font></a><br><br></td>
</tr>
</table></td>
<td><table border=0 valign=top align=left cellpadding=0 cellspacing=10 width=500px bgcolor=#225E90>
<tr>
<td width=px height=px align=center valign=bottom>
<FORM ACTION="engine.asp" NAME="form1" METHOD="post"><TABLE bgcolor=white ALIGN=CENTER BORDER=0>
<TR>
<TD ALIGN="right">Login:</TD>
<TD><INPUT TYPE="text" NAME="username"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right">Password:</TD>
<TD><INPUT TYPE="password" NAME="password"></INPUT></TD>
</TR>
<TR>
<TD ALIGN="right"></TD>
<TD><INPUT TYPE="submit" VALUE="Login"></INPUT>
<INPUT TYPE="reset" VALUE="Reset"></INPUT>
</TD>
</TR>
</TABLE>
</FORM></td>
</tr>
</table></td>
<td width=100%><img src="images/spacer2.gif"></td>
</table>
</BODY>
</html> --->
----------------------------------------------------------------------
Can anyone tell me why?