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