. Net Auto Update component ant

Source: Internet
Author: User

Ant is an open-source automatic update tool based on beetle. It mainly includes three parts: Network File Service, file update management, and client update components.

    • Network File Service

The server is mainly used for file management, including file upload and download. The service must generate an RSA certificate when it is enabled. It is mainly used to verify the validity when the Management Terminal updates the file.

    • File update management

The file management end is a file used to manage updates. The private key generated by the server must be placed in the management end directory for effective verification. ant updates allow directory structure updates. Therefore, when the client updates the directory structure file, it will automatically create it as needed if there is no local directory structure file. Ant file updates do not use version numbers as update tags. As long as the management end updates the corresponding file, a new guid value will be generated, when the client is updated, the corresponding file will be updated if the corresponding guid does not match.

    • Client updates

Automatic updateProgramIs an EXE file, which is placed in the corresponding directory of the program. The component provides related object methods to detect the update source.

    • Components used by the program

Before using it, you must add it to the configuration file of your program.

 <  Configuration  >   <  Configsections  >      <  Section  Name  = "Beetle"  Type  = "Beetle. configselection, beetle"  />      <  Section  Name  = "Antupdatesection"  Type  = "Ant. component. antupdatesection, Ant. component" />    </  Configsections  >    <  Beetle  Connections  = "10"  Pools  = "1"  Socketsendthreads  = "1"  Socketreceivethreads  = "1"  Socketthreadsleep  = "10" Workthreads  = "1"  Workthreadsleep  = "10"  Sendbuffersize  = "8048"  Receivebuffersize  = "8048"  Packagemaxsize  = "120000"  Stringencodingsize  = "64000"  Channelmaxqueuedata  = "0" Executioncontext  = "False"  Timeout  = "30"  Statistics  = "True"  />    <  Antupdatesection  Xmlns  = "Urn: ant. component"  Host  = ""  Port  = "9560"  >   </  Antupdatesection  >  </  Configuration  > 

There are two configuration items: one is beetle configuration information, and the other is configuring ant update information mainly including updating the service IP address, domain name, and port. reference ant. component. the DLL component is then used in the main form as followsCode:

Private VoidForm1_load (ObjectSender, eventargs e) {Updater update=NewUpdater ();If(Update. Detect () {close (); update. Update ("Ant.update.test.exe",True);}}

And whether to automatically close the update form.

Download complete component code

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.