How to Download a file or .exe in C# programming

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • UmairP
    New Member
    • Aug 2008
    • 3

    How to Download a file or .exe in C# programming

    Hi there. I am new to this forum. I would like to know how can I download a file or .exe from a server on to the client machine. My software will run on the client machine. I want to know if there is some built in functionalty in windows that I may use.
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    You want to download it from a web server? If you are using .NET, you can use HttpWebResponse and write the resulting stream to a file. If you aren't using .NET, you are in the wrong forum. :)

    You need to clarify your question.

    Comment

    • UmairP
      New Member
      • Aug 2008
      • 3

      #3
      I am using C#.NET to write a desktop software that will download exe from webserver. I have a webserver as well. I just want to know if there is a built in way in .NET framework or windows that I can use.

      Comment

      • alag20
        New Member
        • Apr 2007
        • 84

        #4
        Originally posted by UmairP
        I am using C#.NET to write a desktop software that will download exe from webserver. I have a webserver as well. I just want to know if there is a built in way in .NET framework or windows that I can use.

        if you are already having a webserver then you can simply send the data as if you were passing bytes as the parameter. A better approach for large file is to use MTOM on both the webserver and client. Google it and you will find lots of sample code for this.

        Comment

        Working...