asp.net2.0 to realize automatic upgrade of website

Source: Internet
Author: User
asp.net

The automatic upgrade of the website is mainly to carry out some files from a server to the server, and then update the downloaded files and other operations.

For example, now there are server A, Server B, and client C.

As a COM company developed Product Div Site system is installed on Server B, and its update settings and update files on Server A. When client C accesses the Web site of server B, b downloads the update file from a and then updates.

Although the fourth step is the most important, is the core of logic, but download what files, how to download also tied to us.

The asp.net2.0 described here is vb.net. VB.net introduced a new namespace--my.
My space contains a lot of content, let's say one here. Perhaps a lot of people have noticed, is the My.Computer.Network.DownloadFile method.

Partial Class _defaultclass _default
Inherits System.Web.UI.Page


Protected Sub Page_Load () Sub Page_Load (ByVal sender as Object, ByVal e as System.EventArgs) Handles Me.load
Dim pFile as String = "http://xpasp.e0351.cn/aa.html"
Dim sfile as String = "cc.html"
My.Computer.Network.DownloadFile (PFile, System.Web.HttpContext.Current.Server.MapPath (sfile))
End Sub
End Class

Very simple, hehe. When User C opens the page, the program downloads the file automatically.
The other part does not introduce comparisons, because the logic is more complex. For example, I want to implement the update priority (must be updated, user selection, etc.), as well as version control.

by Cheping
July 10, 2006



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.