Dreamweaver: pagina asp e db access

Di: spila | 26/09/2020 18:51:02
Ho il mio spazio in aruba ed anche seguendo il vademecum non riesco a far funzionare la mia pagina ASP per il log-in in una sezione riservata del sito.
Il locale ovviamente tutto funziona. Il sito è www.roma122.it ecco l'errore ed il mio codice.
Grazie a tutti per l'aiuto.
Errore:
Active Server Pages error 'ASP 0131'
Disallowed Parent Path
/CoCa/Area Riservata/log-in.asp, line 2
The Include file '../../Connections/accessi.asp' cannot contain '..' to indicate the parent directory.
File html :
forse l’errore è qui ma non so come correggerlo grazie a tutti piero .
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="/Connections/accessi.asp" -->
<!--#include file="/coca/area riservata/log-in.asp" -->
<!conn.Open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("/mdb-database/accessi.mdb")-->
<%
' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Server.HTMLEncode(Request.QueryString)
MM_valUsername=CStr(Request.Form("Nome utente"))
If MM_valUsername <> "" Then
MM_fldUserAuthorization=""
MM_redirectLoginSuccess="Home coca_riservata.asp"
MM_redirectLoginFailed="Accesso negato.asp"
MM_flag="ADODB.Recordset"
set MM_rsUser = Server.CreateObject(MM_flag)
MM_rsUser.ActiveConnection = MM_accessi_STRING
MM_rsUser.Source = "SELECT Nome, Password"
If MM_fldUserAuthorization <> "" Then MM_rsUser.Source = MM_rsUser.Source & "," & MM_fldUserAuthorization
MM_rsUser.Source = MM_rsUser.Source & " FROM Utenti WHERE Nome='" & Replace(MM_valUsername,"'","''") &"' AND Password='" & Replace(Request.Form("pas"),"'","''") & "'"
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_UserAuthorization") = CStr(MM_rsUser.Fields.Item(MM_fldUserAuthorization).Value)
Else
Session("MM_UserAuthorization") = ""
End If
if CStr(Request.QueryString("accessdenied")) <> "" And false Then
MM_redirectLoginSuccess = Request.QueryString("accessdenied")
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginSuccess)
End If
MM_rsUser.Close
Response.Redirect(MM_redirectLoginFailed)
End If
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0022)http://www.agesci.org/ -->
<HTML><!-- InstanceBegin template="../../Templates/pagina4.dwt" codeOutsideHTMLIsLocked="false" --><HEAD>
<!-- InstanceBeginEditable name="doctitle" -->
<TITLE>Log-in</TITLE>
<!-- InstanceEndEditable --><META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<SCRIPT language=JavaScript type=text/JavaScript>
<!--
function pviiClassNew(obj, new_style) {
obj.className = new_style;
}
function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function ApplyXPOverStyle(obj,color,color2,addborder) {
obj.style.backgroundColor = color;
obj.style.borderColor = color2;
if (addborder=='true') {obj.style.borderStyle='solid';obj.style.borderWidth='1px'}
}
function ApplyXPOutStyle(obj) {
obj.style.backgroundColor = '';
if (navigator.appName == 'Netscape') { obj.style.borderColor = 'EBEBEB'; } else {
obj.style.borderColor = ''; }
obj.style.borderStyle = '';
}
//-->
</SCRIPT>
<META content="Microsoft FrontPage 4.0" name=GENERATOR>
<!-- InstanceBeginEditable name="head" -->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
<style type="text/css">
<!--
.Stile2 {color: #0000FF}
-->
</style>
<style type="text/css">
<!--
.Stile3 {font-size: 16}
-->
</style>
<!-- InstanceEndEditable -->
<link href="../../home.css" rel="stylesheet" type="text/css">
<link href="../../agesci.css" rel="stylesheet" type="text/css">
</HEAD>
<BODY
onload="MM_preloadImages('../../Immagini/Home1.gif','../../Immagini/Home2.gif','../../Immagini/coca4.gif','../../Immagini/coca2.gif','../../Immagini/gruppo2.gif','../../Immagini/branche3.gif','../../Immagini/branche2.gif','../../Immagini/Sbanb2.gif')">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<!--DWLayoutTable-->
<TBODY>
<TR>
<TD bgColor=#6487db colSpan=2 height=80>
<TABLE width="100%" border=0 cellPadding=0 cellSpacing=0>
<!--DWLayoutTable-->
<TBODY>
<TR>
<TD width=360><a href="../../Index.htm"><img src="../../Immagini/ROMA_122.jpg" alt="roma122,scout" width="360" height="80" border="0"></a></TD>
<TD width="597" align=right class=indirizzo><img src="../../Immagini/banner.jpg" width="304" height="67"></TD>
</TR>
</TBODY></TABLE></TD></TR>
<TR>
<TD bgColor=#ffffff colSpan=2 height=1><IMG alt="spazio vuoto"
src="file:///C|/Documents%20and%20Settings/Pierantonio/Documenti/Web/mioweb20/images/spazio.gif" width="1" height="1"></TD></TR>
<TR>
<TD class=alta-visibilita align=middle width=180 bgColor=#2e53ab
height=34><div align="center">
<!-- #BeginDate format:aSw1m -->Ven 29 Luglio, 2005 8:30<!-- #EndDate -->
</div></TD>
<TD width="100%" vAlign=top bgColor=#2e53ab><!-- InstanceBeginEditable name="EditRegion7" --><!-- #BeginLibraryItem "/Library/barra.lbi" --><body onLoad="MM_preloadImages('../Immagini/Home1.gif','../Immagini/Home2.gif','../Immagini/coca2.gif','../Immagini/gruppo2.gif','../Immagini/Sbanb2.gif','../Immagini/branche3.gif','../Immagini/branche2.gif','../Immagini/coca4.gif')"><table width="12" height="32" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="32"><a href="../../Index.htm" target="_top" onClick="MM_nbGroup('down','group1','Home','../../Immagini/Home3.gif',1)" onMouseOver="MM_nbGroup('over','Home','../../Immagini/Home2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../../Immagini/Home3.gif" alt="" name="Home" width="70" height="30" border="0" onload="MM_nbGroup('init','group1','Home','../../Immagini/Home1.gif',1)"></a></td>
<td><a href="../CoCa.htm" target="_top" onClick="MM_nbGroup('down','group1','Coca','../../Immagini/coca4.gif',1)" onMouseOver="MM_nbGroup('over','Coca','../../Immagini/coca2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../../Immagini/coca1.gif" alt="" name="Coca" width="70" height="30" border="0" onload=""></a></td>
<td><a href="../../Gruppo/Gruppo.htm" target="_top" onClick="MM_nbGroup('down','group1','Gruppo','',1)" onMouseOver="MM_nbGroup('over','Gruppo','../../Immagini/gruppo2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../../Immagini/gruppo1.gif" alt="" name="Gruppo" width="70" height="30" border="0" onLoad=""></a></td>
<td><a href="../../Branche/home_branche.htm" target="_top" onClick="MM_nbGroup('down','group1','baranche','../../Immagini/branche3.gif',1)" onMouseOver="MM_nbGroup('over','baranche','../../Immagini/branche2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../../Immagini/branche1.gif" alt="" name="baranche" width="70" height="30" border="0" onLoad=""></a></td>
<td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','Sbandieratori','',1)" onMouseOver="MM_nbGroup('over','Sbandieratori','../../Immagini/Sbanb2.gif','',1)" onMouseOut="MM_nbGroup('out')"><img src="../../Immagini/Sbanb1.gif" alt="" name="Sbandieratori" width="80" height="30" border="0" onLoad=""></a></td>
</tr>
</table><!-- #EndLibraryItem --><!-- InstanceEndEditable --></TD>
</TR>
<TR>
<TD height="531" vAlign=top>
<TABLE height="100%" cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top
background="file:///C|/Documents%20and%20Settings/Pierantonio/Documenti/Web/mioweb20/bgsx.jpg"
bgColor=#c8d4f2>
<!-- InstanceBeginEditable name="EditRegion5" -->
<DIV id=menu>
<TABLE cellSpacing=1 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=menu-titolo height=26>Menù Principale</TD>
</TR>
<TR>
<TD height=18><a href="log-in.asp">Area Riservata </a></TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18>Per contattarci </TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<!-- InstanceEndEditable --><BR>
<!-- InstanceBeginEditable name="EditRegion6" -->
<DIV id=menu>
<TABLE cellSpacing=1 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD class=menu-titolo height=26>Le Unità</TD>
</TR>
<TR>
<TD height=18><a href="../../Branche/L_C/Z_B/Home_Z_B.htm">Branco Zanna Bianca </a></TD>
</TR>
<TR>
<TD height=18><a href="../../Branche/L_C/R_d_P/Home_R_d_P.htm">Branco Roccia Della Pace </a></TD>
</TR>
<TR>
<TD height=18><a href="../../Branche/L_C/F_R/Home_F_R.htm">Branco Fiore Rosso </a></TD>
</TR>
<TR>
<TD height=18><a href="../../Branche/E_G/M.L.King/home_m_l_king.htm">Reparto M.L.Kimg </a></TD>
</TR>
<TR>
<TD height=18><a href="../../Branche/E_G/S.Giorgio/home_S_Giorgio.htm">Reparto S. Giorgio</a> </TD>
</TR>
<TR>
<TD height=18><a href="../../Branche/R_S/home_R_S.htm">Clan Popeye </a></TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
<TR>
<TD height=18> </TD>
</TR>
</TBODY>
</TABLE>
</DIV>
<!-- InstanceEndEditable --><BR>
<!-- InstanceBeginEditable name="EditRegion8" --> <!-- InstanceEndEditable --></TD>
</TR></TBODY></TABLE> </TD>
<TD valign="top"><!-- InstanceBeginEditable name="TESTO" -->
<table width="843" height="547" border="0" cellpadding="0" cellspacing="0" bgcolor="#2E53AB">
<!--DWLayoutTable-->
<tr>
<td height="88" colspan="8" valign="top"><img src="../../Immagini/Giwell.JPG" width="835" height="88"></td>
</tr>
<tr>
<td colspan="2" rowspan="2" valign="top"><img src="../../Immagini/coca.gif" width="64" height="71"></td>
<td width="173" height="54"> </td>
<td width="331" valign="top" bgcolor="#2E53AB"><div align="center" class="portale-titolo">
<p align="center" class="portale-titolo"> COMUNITA' CAPI</p>
</div></td>
<td width="196"> </td>
<td colspan="2" rowspan="2" valign="top"><div align="left"><img src="../../Immagini/giglio.gif" width="71" height="75"></div></td>
<td width="8"> </td>
</tr>
<tr>
<td height="21"> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="53" height="30"></td>
<td width="11"></td>
<td></td>
<td></td>
<td></td>
<td width="19"> </td>
<td width="53"></td>
<td></td>
</tr>
<tr>
<td height="150"></td>
<td colspan="5" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="733" height="131"><table width="729" height="90" border="0">
<tr>
<td height="86" class="menu-titolo-agesci"><div align="center">
<form ACTION="<%=MM_LoginAction%>" name="form1" method="POST">
<table width="371" border="0">
<tr class="menu-titolo-agesci">
<td width="145" class="menu-titolo">Nome Utente </td>
<td width="216">
<div align="left">
<input name="Nome utente" type="text" id="Nome utente">
</div></td>
</tr>
<tr class="menu-titolo-agesci">
<td height="25" class="menu-titolo">Password</td>
<td>
<div align="left">
<input name="pas" type="password" id="pas">
</div></td>
</tr>
<tr class="menu-titolo-agesci">
<td height="50" colspan="2"><div align="center">
<input type="submit" name="Submit" value="Entra Area Risrvata">
</div></td>
</tr>
</table>
</form>
</div></td>
</tr>
</table> <span class="Stile2"></span></td>
</tr>
</table></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td height="340"></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<!-- InstanceEndEditable --></TD>
</TR>
<tr>
<td height="0"></td>
<td></td>
</tr>
<tr>
<td height="1"><img src="../../spacer.gif" alt="" width="172" height="1"></td>
<td></td>
</tr>
</TBODY></TABLE>
</BODY><!-- InstanceEnd --></HTML>

Risposte



Sui server Microsoft 2003 il percorso "../cartella/pincopalla" non è sempre consentito, soprattutto nei file di inclusione.
Devi eliminare i caratteri ".." in modo che il percorso sia "/cartella/pincopalla".
I server di Aruba sono configurati per supportare <!--#include virtual="/Connections/accessi.asp'" -->

Di: Gian Paolo | 26/09/2020 18:52:02