Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default uploading a file

    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 Karaboša Guest

  2. Similar Questions and Discussions

    1. Uploading File - Please Help :-)
      Hello, I'm trying to upload files from my computer to folders on my website using Contribute, but can't. Can someone please assist me? Thank...
    2. Uploading a PDF File
      I cannot seem to find anything in the Contribute online help regarding uploading a PDF file from within Contribute. A user needs to be able to...
    3. File Uploading
      > I have ASP 3.0 and I cannot change that, but how can I
    4. Web Service: Uploading files and setting file security on a file server
      I have written a web service that provides the following methods: UploadFile SetNTFSSecurity Their purpose is to allow a user to Upload a file...
    5. Help uploading a file please
      Hey guys, I am trying to get this script working to upload a file and it keeps saying there's an error in copying the file. I've included as much...
  3. #2

    Default Re: uploading a file

    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:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche
    "Volkan Karaboša" <volkan.karaboga@aktif.com.tr> wrote in message
    news:OUUiBx$WDHA.212@TK2MSFTNGP12.phx.gbl...
    > 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)
    >
    >

    S. Justin Gengo Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139