uploading a file

  • Thread starter Thread starter Volkan Karaboða
  • Start date Start date
V

Volkan Karaboða

Hi all!

I have used code below to upload file but I receive an error on last row of
code telling me ( method not allowed ) is it about iis or http protocols??
can you tell me please what the problem is.

thanks...


Dim uriString As String = "http://aktif2000/basvuru/basvuru_resimler/"

' Create a new WebClient instance.

Dim myWebClient As New System.Net.WebClient

Dim fileName As String = "C:\Documents and Settings\VOLKAN.AKTIF_NT4\My
Documents\My Pictures\DAVETIYE.jpg"

' Upload the file to the Url using the HTTP 1.0 POST.

Dim responseArray As Byte() = myWebClient.UploadFile(uriString, "POST",
fileName)
 
Volkan,

Try dimming your array differently:

Dim responseArray() As Byte = myWebClient.UploadFile(uriString, "POST",
fileName)

Sincerely,

--
S. Justin Gengo, MCP
Web Developer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
 
Back
Top