Pagina 1 di 5 1 2 3 ... ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 48
  1. #1
    Utente di HTML.it L'avatar di bob18
    Registrato dal
    Jun 2004
    Messaggi
    1,035

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

    salve ragazzi,
    ho un problema con un ecommerce.
    in locale funziona tutto benissimo, però mettendolo online si verifica un problema ogni volta che inserisco un nuovo prodotto.
    praticamente mi permette di scegliere la foto del prodotto direttamente dai file del mio pc tramite un pulsante "Sfoglia...".

    Solo che appena confermo il tutto mi compare il seguente errore:
    Server.MapPath() error 'ASP 0175 : 80004005'

    Disallowed Path Characters

    /ScriptLibrary/incPureUpload.asp, line 162

    The '..' characters are not allowed in the Path parameter for the MapPath method.
    la riga in rosso corrisponde a quella alla quale l'errore si riferisce:
    codice:
      GP_keys = UploadRequest.Keys
      for GP_i = 0 to UploadRequest.Count - 1
        GP_curKey = GP_keys(GP_i)
        'Save all uploaded files
        if UploadRequest.Item(GP_curKey).Item("FileName") <> "" then
          GP_value = UploadRequest.Item(GP_curKey).Item("Value")
          GP_valueBeg = UploadRequest.Item(GP_curKey).Item("ValueBeg")
          GP_valueLen = UploadRequest.Item(GP_curKey).Item("ValueLen")
    
          'Get the path
          if InStr(UploadDirectory,"\") > 0 then
            GP_curPath = UploadDirectory
            if Mid(GP_curPath,Len(GP_curPath),1)  <> "\" then
              GP_curPath = GP_curPath & "\"
            end if         
            GP_FullPath = GP_curPath
          else
            GP_curPath = Request.ServerVariables("PATH_INFO")
            GP_curPath = Trim(Mid(GP_curPath,1,InStrRev(GP_curPath,"/")) & UploadDirectory)
            if Mid(GP_curPath,Len(GP_curPath),1)  <> "/" then
              GP_curPath = GP_curPath & "/"
            end if 
           GP_FullPath = Trim(Server.mappath(GP_curPath)) 
          end if
    so che in aruba con il windows 2003 (mi pare) bisogna sostituire determinate condizioni ma non so davvero dove mettere le mani.

    potreste aiutarmi?


    grazie mille e buone feste a tutti!



  2. #2
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

  3. #3
    Utente di HTML.it L'avatar di bob18
    Registrato dal
    Jun 2004
    Messaggi
    1,035
    si, avevo già letto quel thread e molti altri sull'argomento.
    so cosa cambia in Win2003 ma non so dove mettere le mani in quel codice

    potreste darmi una mano?


  4. #4
    Utente di HTML.it L'avatar di bob18
    Registrato dal
    Jun 2004
    Messaggi
    1,035
    uppete

    è natale!!!

  5. #5
    Prova a stampare il path:

    codice:
      GP_keys = UploadRequest.Keys
      for GP_i = 0 to UploadRequest.Count - 1
        GP_curKey = GP_keys(GP_i)
        'Save all uploaded files
        if UploadRequest.Item(GP_curKey).Item("FileName") <> "" then
          GP_value = UploadRequest.Item(GP_curKey).Item("Value")
          GP_valueBeg = UploadRequest.Item(GP_curKey).Item("ValueBeg")
          GP_valueLen = UploadRequest.Item(GP_curKey).Item("ValueLen")
    
          'Get the path
          if InStr(UploadDirectory,"\") > 0 then
            GP_curPath = UploadDirectory
            if Mid(GP_curPath,Len(GP_curPath),1)  <> "\" then
              GP_curPath = GP_curPath & "\"
            end if         
            GP_FullPath = GP_curPath
          else
            GP_curPath = Request.ServerVariables("PATH_INFO")
            GP_curPath =  Trim(Mid(GP_curPath,1,InStrRev(GP_curPat
    h,"/")) & UploadDirectory)
            if Mid(GP_curPath,Len(GP_curPath),1)  <> "/" then
              GP_curPath = GP_curPath & "/"
            end if 
         GP_FullPath = Trim(Server.mappath(replace(GP_curPath, "..", ""))         
            response.write(GP_FullPath)
            response.end
    end if
    e postalo qui.
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

  6. #6
    Utente di HTML.it L'avatar di bob18
    Registrato dal
    Jun 2004
    Messaggi
    1,035
    scusa l'ignoranza, ma cosa vuol dire stampare il path?
    :rollo:


  7. #7
    Esegui il codice che ti ho modificato e posta qui il percorso.
    Provare paura per un qualcosa che ti possa capitare nel futuro non ti evita quell'evento,ti fa soltanto vivere un presente sbagliato!

  8. #8
    Utente di HTML.it L'avatar di bob18
    Registrato dal
    Jun 2004
    Messaggi
    1,035
    sostituendo il codice che mi hai dato tu mi esce questo errore questa volta non appena apro la pagina di inserimento prodotti

    codice:
    Microsoft VBScript compilation error '800a03ee' 
    
    Expected ')' 
    
    /ScriptLibrary/incPureUpload.asp, line 162 
    
    GP_FullPath = Trim(Server.mappath(replace(GP_curPath, "..", ""))
    ----------------------------------------------------------------^
    ho capito che devo mettere una parentesi ma non so dove!


    grazie!

  9. #9
    che il giovane s'aspetta una parentesi chiusa. gli manchera'....

  10. #10
    Utente di HTML.it L'avatar di bob18
    Registrato dal
    Jun 2004
    Messaggi
    1,035
    si, ma dove la metto?

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.