ASP. NET automatically upgrades websites, and asp.net automatically upgrades websites.
The automatic upgrade of the website is mainly to download some files from one server to the current server, and then update the downloaded files.
For example, there are server A, server B, and client C.
The product DIV website system developed by COM is installed on server B, and its update settings and files are on server. When customer C accesses the website of server B, B downloads the Update file from server A and performs the update operation.
Although Step 4 is the most important and the core of the logic, we can also find out what files to download and how to download them.
ASP. NET2.0 introduced here is VB. NET. VB. NET introduces a new namespace -- My.
My space contains a lot of content. Let's talk about it here. Many people may have noticed that the My. Computer. Network. DownloadFile method is used.
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 = "asp.e0351.cn/aa.html"> 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
It's easy, huh, huh. When user C opens the page, the program automatically downloads the file.
The comparison is not introduced in other sections, because the logic is complicated. For example, I want to implement the update priority (which must be updated and selected) and version control.