Implement automatic ASP. NET Website upgrade
To automatically upgrade an ASP. NET Website, you must 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 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.
- PartialClass_DefaultClass_Default
- InheritsSystem.Web.UI.Page
-
- ProtectedSubPage_Load()SubPage_Load(ByValsenderAsObject,
ByValeAsSystem.EventArgs)HandlesMe.Load
- DimpFileAsString="http://xpasp.e0351.cn/aa.html"
- DimsFileAsString="cc.html"
- My.Computer.Network.DownloadFile(pFile,System.Web.HttpContext.
Current.Server.MapPath(sFile))
- EndSub
- EndClass
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, if I want to implement the update priority that must be updated, the user selected, and so on), there are also version control and so on. The above describes how to automatically upgrade an ASP. NET Website.
- Analysis of Theme functions in ASP. NET development skills
- ASP. NET Dynamic Compilation
- Analysis on ASP. NET supported by Apache
- Introduction to ASP. NET Server standard controls
- Analysis on SQL Server Database Backup Recovery in ASP. NET