ASP.NET + XML development network hard disk

xiaoxiao2021-03-06  60

The three ways commonly used by file transfer FTP, Email and "Online Neighbors" achieve the communication of file data to some extent, but they are mainly directed to the "point-to-point" transmission, unable to implement the application requirements of "a space, resource mutual" This "point-to-many" sharing mode needs to seek additional transmission paths, and the network hard disk is a good solution. Common transmission methods and their difficulties in a particular environment We often have such applications: exchange public data files through the network to achieve resource sharing, and protect private data is not illegally access, and operate in a simple, intuitive manner. Our common files transmit FTP, Email mail, and online neighbors can implement file transfer. Among them, "FTP" is most powerful, but it is slightly complicated using it, and a lot of sets are enough to stop, especially if the number of users is not foreseen, the settings for special needs users will be more cumbersome; "email" is Everyone is familiar with, but its transfer not only needs you to connect into the Internet, and it's

Safety

Sexuality is a problem. In the enterprise, financial, labor and other documents need to communicate in this way is not a good way; "online neighbors" is another way to transfer files, by specifying a shared web folder on this machine and Place resource files, users within a certain range can access these files, however, this way is quite limited, usually in the same DNS address, can be accessed smoothly, other users, in particular the user, it is difficult to use In addition, it is similar to email. It is not intuitive. Many times you have to expand search on many lists of the computer to get the resources you want! From this point of view, although the above three ways achieve the communication of file data to some extent, they are mainly directed to the "point-to-point" transmission (you can only wait for the other party to place data without active "visualization". Unable to achieve the application requirements of "a piece of space, resources", this "point-to-many" sharing method needs to seek additional transmission channels, and the network hard disk is a good solution. The network hard disk dominant network hard disk (also known as shared space) is a hard disk space on the server, here if you have enough permissions, you can operate at it, just like using your local computer. To know, all of this is transmitted in HTTP, in the form of a web, in front of all users, pass

Browser

This familiar way is accessed, so that "a space, resource mutual" sharing mode is achieved! In addition, the network hard disk interface runs on the client, which allows the user to submit data to the server, then manages this information within the specified range, which is used in actual development, especially in the construction of interactive network document management system. : Online test systems, file transfer systems, news distribution systems, and company bidding systems have a large number of applications! Such a network hard disk system is developed using ASP.NET (Visual C # Language Implementation) and XML (Extensible Markup Language). Regarding the development details of the program and the key technologies and difficulties used in the code, there is a detailed explanation. Refer to these instructions, you can fully develop your own network hard drive. Network hard disk implementation Our network hard drive implements the following features: 1. View folder content 2. Create a new folder at the same time can set access rights 3, the jump between folders: go to the next level, return to the previous level 4 , Upload file to the specified folder 5, download

Document to this machine or online viewing file content 6, delete file or folder development details and technical key points 1. View folder content: The program will enter the specified root folder (such as / Nethard) at the beginning, this folder The content will be displayed by the data binding control (DataGrid), including the following: Category (Different Folders or Files), Name, Permissions (Whether to enter the folder? Can you download file?), Delete (whether to delete files Or folders?) And creators for folders. Here, due to the dynamic changes in the folder (you don't know when you send a file or create a file or delete them), we read the contents of the specified folder by dynamically create data table DATATABLE. As the data source is bound to the display control DataGrid, so that the display of the data is always in time. The function of creating a dynamic table is as follows: Public DataTable Bind (String FullFolderPath) // Creating Data Table Read Folder Character {// The following is a dynamically created data table method DataTable dt = new dataable (); DATAROW DR; // first created Data Sheet Structure Dt.columns.Add (New Datacolumn ("Type", System.Type.gettype ("System.String"))); // Type Dt.columns.Add (New Datacolumn ("Name", System.Type .Gettype ("System.String")))))))))))))))))))); // Name Dt.columns.Add (New Datacolumn ("Action", System.Type.gettype ("System.String")); // Operate Dt.columns. Add ("Owner", System.Type.gettype ("System.String"))))); // Create a populated data for each row (String D in Directory.GetFileSystem "

IE

S (FullFolderPath) {DR = DT.NEWROW (); // Building a string String [] Parts = D.Split (new char [] {'//'}); string txt = parts [parts.length-1] ; // Take the last part of the string, it will might be the file name or folder DR [1] = txt; // Name Name if (file.exists (d)) // If it is file {DR [0] = "File"; // Type Type INT POS = CURRFULLPATH.INDEXOF ("Nethard"); String Relaurl = currfullpath.substring (POS); string url = "http://10.50.50.1/sharedspace/" transaurl "/" TXT; // 10.80.50.1 To the author server address, you should modify it to your server address DR [2] = "download

"} Else if (Directory.exists (D)) {// If it is a folder DR [0] =" folder "; // type type String Pass

Word

= Getfolderpassword (d); // acquire folder password information int type = getFolderLimitType (D); if ((Password! = "No") && (Type! = 1)) DR [2] = "

HREF = PasswordValidate.aspx? Path = " D "> Sealed

"; // Operating action else DR [2] ="

enter

转载请注明原文地址:https://www.9cbs.com/read-82994.html

New Post(0)