Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    Server.MapPath() error 'ASP 0175 : 80004005'

    Salve, devo modificare un sito di ecommerce per w2003 (funzionava benissimo su w2000).
    La pagina mi restituisce l'errore:

    Server.MapPath() error 'ASP 0175 : 80004005'
    Disallowed Path Characters

    /ecommerce/admin/modifica_variabili.asp, line 24

    The '..' characters are not allowed in the Path parameter for the MapPath method.

    So che i percorsi che risalgono le cartelle non sono più permessi, infatti in tutte le pagine ho sostituito gli include file con gli include virtual
    es:

    FINO A QUI TUTTO OK!

    Il problema ce l'ho solo su due pagine che utilizzano il mapPath, credo che risolvendo il problema dell'assegnazione del percorso alla variabile strVirtualPath sia sufficiente.
    Solo che non ho idea di come si debba modificare il mapPath! Ho guardato anche sul threat
    http://forum.html.it/forum/showthrea...hreadid=682557 , ma non capisco come applicare le modifiche al mapPath.

    Grazie in anticipo

    Allego qui lo script completo della pagina, magari trovate anche altri problemi :
    <%
    'VERSIONE FILE 1.4.0

    Option Explicit
    %>








    <p align="right">
    ">Indietro
    </p>

    <form action= "update_variabili.asp" method= "post">
    <table align="center" border="0" width="400">

    <%
    Dim strVirtualPath, strFilename, Vars, Commenti, Commento, InizioCommento, FileObject, oInStream, strOutput, Buf, Idx, Index, ParteVariabile, ParteCommento
    strVirtualPath = "../../mdb-database/inc_variabili.asp"

    strFilename = Server.MapPath(strVirtualPath)

    Idx = 0
    Index = 0
    Set FileObject = CreateObject("Scripting.FileSystemObject")
    Set oInStream = FileObject.OpenTextFile(strFilename, 1, 0, 0)
    While NOT oInStream.AtEndOfStream
    strOutput = oInStream.ReadLine
    Buf = Ucase(Left(Trim(strOutput), 3))
    Commento = ""
    If Trim(Left(Buf, 1)) <> "" and Left(Buf, 1) <> "'" and Left(Buf, 1) <> "<" and Left(Buf, 1) <> "%" Then
    If Buf <> "DIM" then
    InizioCommento = InStrRev(strOutput, "'")
    ParteVariabile = Replace(Mid(strOutput, 1, InizioCommento - 1), "=", "{[(~)]}", 1, 1)
    ParteCommento = Mid(strOutput, InizioCommento + 1)
    Commenti = Split(strOutput, "'")
    If InizioCommento > 0 Then
    Vars = Split(Trim(ParteVariabile), "{[(~)]}")
    Commento = Trim(ParteCommento)
    Else
    Vars = Split(strOutput,"{[(~)]}")
    If Ubound(Vars) > 0 Then
    Commento = Trim(Vars(0))
    End If
    End If
    If Ubound(Vars) > 0 Then
    %>
    <tr>
    <td bgcolor="#FFFFEC" valign=top>
    <%=Commento%>

    <%
    If Trim(Ucase(Vars(1))) <> "TRUE" and Trim(Ucase(Vars(1))) <> "FALSE" Then
    Vars(1) = Replace(Vars(1), "
    ", vbCrLf)
    If Mid(Trim(Vars(1)),1,1) = """" And Mid(Trim(Vars(1)),Len(Trim(Vars(1))),1) = """" Then
    %>
    <input type="hidden" Name= "Tipo<%=Index%>" Value="True">
    <textarea Name= "<%=Trim(Vars(0))%>" cols="40" rows="2" style="width=380"><%=Replace(Mid(Trim(Vars(1)),2,L en(Trim(Vars(1)))-2),"""""","""")%></textarea>
    <%
    Else
    %>
    <input type="hidden" Name= "Tipo<%=Index%>" Value="False">
    <textarea Name= "<%=Trim(Vars(0))%>" cols="40" rows="2" style="width=380"><%=Trim(Replace(Vars(1),"""","") )%></textarea>
    <%
    End If
    %>
    <input type="hidden" Name= "Commento<%=Index%>" Value="<%=Commento%>">
    <%
    Else
    %>
    <input type="hidden" Name= "Tipo<%=Index%>" Value="False"><input <%If Trim(Ucase(Vars(1))) = "TRUE" Then%>Checked<%End If%> type="Radio" Name= "<%=Trim(Vars(0))%>" Value="true">Sì<input <%If Trim(Ucase(Vars(1))) = "FALSE" Then%>Checked<%End If%> type="Radio" Name= "<%=Trim(Vars(0))%>" Value="false">No<input type="hidden" Name= "Commento<%=Index%>" Value="<%=Commento%>">


    <%
    End If
    %>
    </td>
    </tr>
    <%
    End If
    Else
    %>
    <input type="hidden" Name= "Tipo<%=Index%>" Value="False"><input type="hidden" Name= "Dim" Value="<%=strOutput%>"><input type="hidden" Name= "Commento<%=Index%>" Value="<%=Commento%>">
    <%
    End If
    Else
    %>
    <input type="hidden" Name= "Tipo<%=Index%>" Value="False"><input type="hidden" Name= "Null<%=Idx%>" Value="<%=strOutput%>"><input type="hidden" Name= "Commento<%=Index%>" Value="<%=Commento%>">
    <%
    idx = idx + 1
    If Mid(strOutput, 1, 2) = "'#" Then
    If Mid(strOutput, 1, 3) = "'##" Then
    %>
    <tr>
    <td>

    </td>
    </tr>
    <tr>
    <td bgcolor="#FF8000" valign=top>

    <center><font color="#FFFFCC" size=3><%=Mid(strOutput, 4)%></font></center>

    </td>
    </tr>
    <%
    Else
    %>
    <tr>
    <td bgcolor="#777777" valign=top>
    <center><font color="#FFFFFF"><%=Mid(strOutput, 3)%></font></center>
    </td>
    </tr>
    <%
    End If
    End If
    End If
    Index = Index + 1
    Wend
    %>
    <tr>
    <td nowrap valign=top align="right">

    <input type="Submit" Name= "Go" Value= "Modifica">
    </td>
    </tr>
    </table>
    </form>


  2. #2
    strVirtualPath = "/mdb-database/inc_variabili.asp"

    il codice mettilo fra i tag [ code ]

  3. #3

    Grazie!

    Grazie mille. adesso funzia.
    Ho visto il tuo sito. Bello! Bello anche quello che fate. Credo che sia molto positivo che ai giorni d'oggi ci sia ancora chi è in grado di appassionarsi così tanto a qualcosa.
    Vorrei proprio averne il tempo anche io!

    Per quanto riguarda il codice... avevo premuto il pulsante per inserire il codice, poi l'ho cancellato per spostare un il testo, poi ho riprovato a premerlo ma mi diceva che lo avevo già inserito, anche se in realtà non c'era.
    In ogni caso no me lo faceva più premere.

    La prossima volta farò più attenzione, grazie.

    Ciao ciao

  4. #4

    Re: Grazie!

    Originariamente inviato da S.t.e.f.040774
    Grazie mille. adesso funzia.
    Prego,

    Originariamente inviato da S.t.e.f.040774
    Grazie mille. adesso funzia.
    Per quanto riguarda il codice... avevo premuto il pulsante per inserire il codice, poi l'ho cancellato per spostare un il testo, poi ho riprovato a premerlo ma mi diceva che lo avevo già inserito, anche se in realtà non c'era.
    In ogni caso no me lo faceva più premere.
    non preoccuparti



    Originariamente inviato da S.t.e.f.040774
    Ho visto il tuo sito. Bello! Bello anche quello che fate. Credo che sia molto positivo che ai giorni d'oggi ci sia ancora chi è in grado di appassionarsi così tanto a qualcosa.
    Vorrei proprio averne il tempo anche io!
    [OT]
    Grazie,
    Bhe il tempo si trova più o meno

    Vedo che sei di Ravenna. a Comacchio ci sono dei nostri amici che fanno scherma
    [/OT]


    ciao

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.