Ciao.

Sto provando ad utilizzare la classe di baol per l'upload dei files.

Ho necessità che il file da uploadare finisca nell'area FTP del server ed ho scritto così:

codice:
If Request("Upload") = "1" then

Function IsSet(Value)
 IsSet = Not IsNull(Value) And Value <> ""
End Function

Sub Write(Value)
 Response.Write Value
End Sub

Set oUpload = new cUpload
With oUpload

oUpload.Load

file_uploaded = replace(oUpload.files("name"), "'", "''") & "." & oUpload.files("ext")

strCartella = oUpload.Form("Nome_cartella")

If oUpload.files("ext") = "bat" then
   Path = "D:\Inetpub\ftproot\cartella\"
else
  Path = strCartella
end if

If IsSet(Path) Then

 oUpload.SetPath Path 
 oUpload.AutoRename = true
 oUpload.Overwrite = false
 
 While Not .Eof
 
 oUpload.SaveAs oUpload.GetFileName 

oUpload.MoveNext
Wend

Else
 Write "Percorso non valido"
End if

End With

Set oUpload = Nothing
Ma lo script va in errore:

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

Invalid Path

/upload.asp, line 165

The Path parameter for the MapPath method must be a virtual path. A physical path was used.
Perchè ???? :master: