darrenakin
asked on
ASP Not working correctly. Error 500
Hello Experts, Thank you in advance for your help. I am running SBS2003 with IIS installed. My HTML website is up and running fine. I have downloaded a knowledge base application that is all ASP. Under my WWW root I created a folder called newkb. This folder has 4 more subfolders and there are files in all folders. If I type in http://www.mydomain.com/newkb my default asp comes up fine. No problems. I can navigate to any page that is in the newkb directory. Also under the newkb folder is a folder called admin, seems to have the same permissions and everything that newkb has. But when I type in http://www.mydomain.com/newkb/admin I get the dreaded 500 error. I cannot even type in http://www.mydomain.com/newkb/admin/default.asp I get the same error message. Needless to say all of this does me no good without the admin modules. Thanks for your help in advance.
ASKER
The error is this;
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/newkb/admin/Default.asp, line 2
The Include file '../Connections/connDUfaqA dmin.asp' cannot contain '..' to indicate the parent directory.
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/newkb/admin/Default.asp, line 2
The Include file '../Connections/connDUfaqA
The error message should give you what you need to resolve the problem.
The error is on line 2 of the script.
I assume the code looks something like this:
<!-- #include file="../Connections/connD UfaqAdmin. asp" -->
change this to:
<!-- #include file="/newkb/Connections/c onnDUfaqAd min.asp" -->
and it should solve the problem. The page with the error is in the following path: /newkb/admin the original code is using .. to try to get to the parent path which would be /newkb since .. is not allowed you can simply code the parent path in place of the .. and it should be resolved. Since this is a script that you downloaded I belive, you may find that this type of issue happens throughout the code and will need to change it as appropriate throughout.
Neal.
The error is on line 2 of the script.
I assume the code looks something like this:
<!-- #include file="../Connections/connD
change this to:
<!-- #include file="/newkb/Connections/c
and it should solve the problem. The page with the error is in the following path: /newkb/admin the original code is using .. to try to get to the parent path which would be /newkb since .. is not allowed you can simply code the parent path in place of the .. and it should be resolved. Since this is a script that you downloaded I belive, you may find that this type of issue happens throughout the code and will need to change it as appropriate throughout.
Neal.
ASKER
Great that solved that problem, but now I am getting this error message;
Active Server Pages error 'ASP 0126'
Include file not found
/newkb/admin/Default.asp, line 2
The include file 'newkb/Connections/connDUf aqAdmin.as p' was not found.
THAT FILE IS REALLY THERE, I did have to go remove .. before the path
Active Server Pages error 'ASP 0126'
Include file not found
/newkb/admin/Default.asp, line 2
The include file 'newkb/Connections/connDUf
THAT FILE IS REALLY THERE, I did have to go remove .. before the path
make sure that you have
/newkb/Connections ....
not just
newkb/Connections ....
/newkb/Connections ....
not just
newkb/Connections ....
ASKER
Active Server Pages error 'ASP 0130'
Invalid File attribute
/admin/Default.asp, line 2
File attribute '/newkb/Connections/connDU faqAdmin.a sp' cannot start with forward slash or back slash.
Invalid File attribute
/admin/Default.asp, line 2
File attribute '/newkb/Connections/connDU
Could you post the actual code from the page.
ASKER
sure, and thank you so much for your help
ASKER
<!--#include file="/newkb/Connections/c
<% Response.Buffer = True %>
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("U
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Reques
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="q
MM_redirectLoginFailed="de
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_fla
MM_rsUser.ActiveConnection
MM_rsUser.Source = "SELECT U_ID, U_PASSWORD"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM USERS WHERE U_ID='" & Replace(MM_valUsername,"'"
MM_rsUser.CursorType = 0
MM_rsUser.CursorLocation = 2
MM_rsUser.LockType = 3
MM_rsUser.Open
If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
' username and password match - this is a valid user
Session("MM_Username") = MM_valUsername
If (MM_fldUserAuthorization <> "") Then
Session("MM_UserAuthorizat
Else
Session("MM_UserAuthorizat
End If
if CStr(Request.QueryString("
MM_redirectLoginSuccess = Request.QueryString("acces
End If
MM_rsUser.Close
Response.Redirect(MM_redir
End If
MM_rsUser.Close
Response.Redirect(MM_redir
End If
%>
<html>
<head>
<title>admin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="/assets/DUfaq.css" rel="stylesheet" type="text/css">
</head>
<body background="../assets/bg_m
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" background="../assets/bgro
<tr>
<td align="center" valign="middle"><table width="100%" height="300" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="2" align="left" valign="top" bgcolor="#000000"><img src="../assets/_spacer.gif
</tr>
<tr>
<td align="center" valign="middle" bgcolor="#006699"><form name="form1" method="POST" action="<%=MM_LoginAction%
<table border="0" cellspacing="4" cellpadding="4">
<tr>
<td colspan="2" class="textBold"><font color="#FFFFFF" size="4"><strong>SPECTRUM
ADMIN PANEL</strong></font></td>
</tr>
<tr>
<td align="right" valign="middle" class="textBold"><font color="#FFFFFF">Admin
ID: </font></td>
<td><font color="#FFFFFF">
<input name="id" type="text" class="form" id="id" value="admin" size="20">
</font></td>
</tr>
<tr>
<td align="right" valign="middle" class="textBold"><font color="#FFFFFF">Password:
</font></td>
<td><font color="#FFFFFF">
<input name="password" type="password" class="form" id="password" size="20">
</font></td>
</tr>
<tr>
<td> </td>
<td> <input name="Submit" type="submit" class="form" value="Login"></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="2" align="left" valign="top" bgcolor="#000000"><img src="../assets/_spacer.gif
</tr>
</table></td>
</tr>
</table>
</body>
</html>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
We are getting so much closer, now I got this.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
/admin/Default.asp, line 15
Would you like for me to open a new question since you did answer the original question? I dont mind let me know.
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path. Make sure that the path name is spelled correctly and that you are connected to the server on which the file resides.
/admin/Default.asp, line 15
Would you like for me to open a new question since you did answer the original question? I dont mind let me know.
ASKER
here is line 15
MM_rsUser.ActiveConnection = MM_connDUfaq_STRING
MM_rsUser.ActiveConnection
OK, you need to look at the connDUfaqAdmin.asp code (at least I'm assuming that is where you will find what we need). Look for the path to the MDB file (access database file). Make sure that path is correct.
Neal.
Neal.
ASKER
I have 2 files in that Directory, the directory is Connections, 1st file name is connDUfaq.asp and here is that code;
<%
' FileName="Connection_odbc_ conn_dsn.h tm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDUfaq_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("newkb\_pri vate\DUfaq .mdb")
%>
2nd file is connDUfaqAdmin.asp, and here is that code.
<%
' FileName="Connection_odbc_ conn_dsn.h tm"
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDUfaq_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("newkb\_pri vate\DUfaq .mdb")
%>
<%
' FileName="Connection_odbc_
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDUfaq_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("newkb\_pri
%>
2nd file is connDUfaqAdmin.asp, and here is that code.
<%
' FileName="Connection_odbc_
' Type="ADO"
' HTTP="false"
' Catalog=""
' Schema=""
MM_connDUfaq_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("newkb\_pri
%>
ASKER
here is the file that I do not have in my directory
' FileName="Connection_odbc_ conn_dsn.h tm"
' FileName="Connection_odbc_
Try this:
MM_connDUfaq_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\newkb\_pr ivate\DUfa q.mdb")
MM_connDUfaq_STRING = "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath("\newkb\_pr
ASKER
Dont we need to add %> at the end of that statement? And also if I do add that %> I get
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
/admin/Default.asp, line 15
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt.
/admin/Default.asp, line 15
ASKER
Let me please add another question, you have most certainly earned these points
ASKER
I am closing this question, since you answered more than my question. GREAT JOB. I have opened a new question up here https://www.experts-exchange.com/questions/21926604/ASP-Database-error.html Please help with this.
Let's find out what the error actually is.
If you are using IE, do the following Click On:
Tools --> Internet Options --> Advanced
Remove the checkmark from "Show Friendly HTTP Error Messages
Now try to go to the page again. You will still get the error message, but there should be a lot more information. This should help us in helping you.
Neal.