You must Sign In to post a response.
  • Category: .NET

    Uploading A file using C#/VB.Net Window application through webservices

    Good Day Everyone

    I need help on how to upload a file using C#/VB.net in windows application to a server on internet, it can be through web services or any other way.

    I am trying to upload a file from schools (schools are using window application) to a central server sitting at a national office.

    I am familiar with Web Services

    Thanks in advance
  • #769542
    Hi Samuel,

    You can easily upload a file from your windows application through a webservice. Do the below steps,

    1. Whenever a file select and hit "Upload" button from your windows application
    2. Convert the selected files into bytes by using the below code,

    byte[] bytes = System.IO.File.ReadAllBytes(filename);

    3. Call your webservice and pass this byte info via post parameter.

    Let me know if you have any questions.

    Regards,
    V.M. Damodharan
    "Your talent will be worthless, when you have fear and tension."

  • #769552
    Thanks for the response

    What do I do after converting them to bytes, how I send it through and how do I receive them on the other side?


  • Sign In to post your comments