per quale motivo con questo semplice codice non riesco a caricare il file su una directory in locale?
sub inserisci(obj as object, e as eventargs)
If Not (foto1.PostedFile Is Nothing) Then
Try
Dim postedFile = foto1.PostedFile
Dim filename As String = Path.GetFileName(postedFile.FileName)
Dim contentType As String = postedFile.ContentType
Dim contentLength As Integer = postedFile.ContentLength
Dim savePath as string = "C:\Inetpub\wwwroot\ws\image\1\"
Response.write (savePath)
postedFile.SaveAs(savePath & filename)
message.Text = postedFile.Filename & " uploaded" & _
"
content type: " & contentType & _
"
content length: " & contentLength.ToString()
Catch exc As Exception
message.Text = "Failed uploading file"
End Try
End If
end sub
mi da sempre il messaggio Failed uploading file
la cartella denominata 1 ha i permessi di scrittura per tutti
i dati in effetti vengono pescati correttamente perchè ho provato a stamparli a video e funzionano correttamente
mah voi che dite?