File upload assitance requested

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

  1. #1

    Default File upload assitance requested

    I'm going crazy trying to do something I think should be simple.

    Task: Windows service that will post a file to a WebServer automatically.

    I have created a form on the remote site. I can use IE and post to it.
    When I try to use System.Net.Webclient to post to the form, it does not work.
    No error is returned, but the file does not upload.


    Here is the code that is used to post.
    Dim Client As New WebClient
    Dim UriString As String = "http://10.80.1.169/vbnetupload/webform1.aspx"
    Dim filename As String = "c:\new.txt"
    Dim responseArray As Byte() = Client.UploadFile(UriString, "POST", filename)

    Can anyone clue me in on what I'm doing wrong here?
    Big Tony Guest

  2. Similar Questions and Discussions

    1. How to upload a file to 2 FTP sites without an upload component for company
      Hi All I can't get round this because it's a local government thing, but I've done a CMS for a school (in ASP classic) that allows them to upload...
    2. Upload Friendly (Multiple File Upload Applet)
      Title : Upload Friendly (Multiple File Upload Applet) Description : UploadFriendly is an easy to use Java Applet that will allow multiple file...
    3. Help Requested: Mac fh9 file to PC fh9+
      Hi there, A friend used his Mac (0n system 9) to produce a file that I have burned to a CD. I specifically downloaded the latest trial of FH11...
    4. NEWBIE: Exporting Assitance
      Hi I am currently learning fireworks and dreamweaver, My page in fireworks has a image on a person which I have added the glow command, the sits...
    5. The file 'bin\WebProj.dll' cannot be copied to the run directory. The requested operation cannot be performed on a file with a user-mapped section open.
      Hi, All, I got this error when trying to compile a web project. The file 'bin\Kennel.dll' cannot be copied to the run directory. The requested...
  3. #2

    Default Re: File upload assitance requested


    "Big Tony" <none@somewhere.else.com> wrote in message
    news:um4bjvs35hdqnudb284dk4giak8idv566n@4ax.com...
    > I'm going crazy trying to do something I think should be simple.
    >
    > Task: Windows service that will post a file to a WebServer automatically.
    >
    > I have created a form on the remote site. I can use IE and post to it.
    > When I try to use System.Net.Webclient to post to the form, it does not
    work.
    > No error is returned, but the file does not upload.
    >
    >
    > Here is the code that is used to post.
    > Dim Client As New WebClient
    > Dim UriString As String =
    "http://10.80.1.169/vbnetupload/webform1.aspx"
    > Dim filename As String = "c:\new.txt"
    > Dim responseArray As Byte() = Client.UploadFile(UriString, "POST",
    filename)
    >
    > Can anyone clue me in on what I'm doing wrong here?

    MS News \(MS ILM\) Guest

  4. #3

    Default Re: File upload assitance requested

    Hi,

    Did you try to catch Exceptions?

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Natty Gur Guest

  5. #4

    Default Re: File upload assitance requested

    | Is it possible to upload the file without user interaction to a form post
    the form?

    No, it is not. If it *would* be possible, it would be a big security flaw.

    --
    Michal A. Valasek, Altair Communications, [url]http://www.altaircom.net[/url]
    Please do not reply to this e-mail, for contact see [url]http://www.rider.cz[/url]
    Keeping Freedom safe from Democracy


    Michal A. Valasek 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