File upload assitance requested

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Big Tony

    #1

    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.Webc lient 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.UploadFi le(UriString, "POST", filename)

    Can anyone clue me in on what I'm doing wrong here?
  • MS News \(MS ILM\)

    #2
    Re: File upload assitance requested


    "Big Tony" <none@somewhere .else.com> wrote in message
    news:um4bjvs35h dqnudb284dk4gia k8idv566n@4ax.c om...[color=blue]
    > 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.Webc lient to post to the form, it does not[/color]
    work.[color=blue]
    > 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 =[/color]
    "http://10.80.1.169/vbnetupload/webform1.aspx"[color=blue]
    > Dim filename As String = "c:\new.txt "
    > Dim responseArray As Byte() = Client.UploadFi le(UriString, "POST",[/color]
    filename)[color=blue]
    >
    > Can anyone clue me in on what I'm doing wrong here?[/color]


    Comment

    • Michal A. Valasek

      #3
      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, http://www.altaircom.net
      Please do not reply to this e-mail, for contact see http://www.rider.cz
      Keeping Freedom safe from Democracy


      Comment

      • Natty Gur

        #4
        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 http://www.developersdex.com ***
        Don't just participate in USENET...get rewarded for it!

        Comment

        • Michal A. Valasek

          #5
          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, http://www.altaircom.net
          Please do not reply to this e-mail, for contact see http://www.rider.cz
          Keeping Freedom safe from Democracy


          Comment

          Working...