Network hard disk

zhaozj2021-02-16  87

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, but its transmission not only needs you to connect into the Internet, and its security is also a problem. In this way, financial, labor, labor and other documents are not good way; "online neighbors" It is another way to transfer the file. By specifying a shared web folder on this machine and placing a resource file, a certain range of users can access these files, however, this way is quite limited, usually in the same Users in the DNS section can be accessed smoothly. Others, especially the users on the Internet, it is difficult to use, and this is similar to email, it is not intuitive, and many times you have to launch a search on a layer of label. May 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 front of the Web in front of all users, accessed through the browser, 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 files to the specified folder 5, download files to this unit 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), the content under this folder is displayed through 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 population of data for each row of data forEach (String D in Directory.GetFileSystem "(fullfolderpath) {DR = DT.NEWROW (); // Building a new line String [] parts = D.Split (new char [] {'//'}); string txt = parts [parts.length-1]; // Take the last part of the character Strings, it will be a file name or folder DR [1] = txt; // Name Nameif (file.exists (d)) // If it is a file {DR [0] = "file"; // Type Type Int POS = CURRFULLPATH.INDEXOF ("Nethard"); String Relaurl = currfulpath.substring (POS); string url = "http://10.50.50.1/sharedspace/" transaurl "/" txt; // 10.80.50.1 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 password = getfolderpassword (d); // acquired folder password information int type = getFolderLimitType (d); if ((((Password! = "no") && (Type! = 1)) DR [2] = " Sealed "; // OperationELSE DR [2] = " Enter "; // Operation ActionDR [3] = getFolderowner (D); // Take a folder creator name} elseresponse.write ("