Skip to content

Send a file through Http server

George George

Asked Dec 23, 2008, 2:37 AM EST7 answers
Share
LinkedInX

Hello everyone,

I am writing a console application which is using http(s) to send a couple of binary files to IIS server (an ASP.Net application). I am wondering in order to improve upload performance and reliability, which C# APIs should I use to upload files and any special points I need to consider in my scenario?

thanks in advance,
George

6 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • Bechir Bejaoui
    0
    use
    The System.Net and especially the WebClient object to transfer file via http
    0
  • 0

    Thanks Bechir,

    I am not sure whether using WebClient or using WebHttpRequest or something else is faster? Any ideas?

    regards,

    George

    0
  • 0

    Thanks Deepak,

    I am new to this topic. Do you have any other reference samples for upload files?

    regards,

    George

    0
  • Bechir Bejaoui
    0
    WebClient is the better as it allows you with a simple way  to leverage the task of uploading asynchronously as it has a special method to do that directly so it will be better for the application performance

    0
  • 0

    Thanks for your advice, Bechir!

    regards,

    George

    0
  • 1 short reply
    • Bechir Bejaoui
      0
      Not at all George ;-}
      0