ASP. NET automatically upgrades websites, and asp.net automatically upgrades websites.

Source: Internet
Author: User

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.

Related Article

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.