KB_Soft Group - Software Vendor's Development Partner
Start page
Site map
Contacts
 

Virtual File System Component

 
   

Objectives

The main objective of the project was to design a COM Server library that would support communication using the SMB protocol. The Server had to use the NT LM 0.12 dialect of the SMB protocol, as well as the command sets specific for the MS Windows 9x and MS Windows NT operating systems. Mainly, this COM component targets Web applications. The files of a Web application are located in a special ZIP archive. The component controls this archive, loading (while being launched) its contents into the special cache of the PC RAM.
  While running, the component receives the SMB messages from the Client (which can be a Web server or something else, e.g. a typical Windows application) and handles them, providing the Client application with an answer, that is the contents of the documents from the ZIP archive being under control. Thus, by using this component the application (e.g. Microsoft Word) can full-functionaly work (read/edit/delete) with the documents actually located in a ZIP archive which, in its turn, can be located on a local or network resource.
   

Results

According to the task we got from our Customer, this project resulted in the COM library which allows processing the files located in a ZIP archive. This version of the library runs on all NT platforms (Windows NT4, 2000, 2003 Server, XP) and supports most file formats (text documents, Word documents, Excel, Access, graphical formats, multimedia files, such as avi, mp3, wmv, etc.). Also, it is possible to host ASP and ASP.NET applications that use any databases in a ZIP archive which the library works with. Thus, this component enables the user to work effectively with Web applications whose files are physically located in the archive. Taking into account that the archive can be password-protected, this
  component is applicable for solving the task of providing the integrity of virtual directories of a Web server and Web applications running via Internet. Also, the implemented component supports work with the Web applications which run under control of IIS on all NT platforms. Thus, this solution can be effectively used to work with the IIS virtual directories that describe the Web applications whose files are located in the archive this component controls. Saving the scripts of a Web application in the password-protected ZIP archive combined with other measures allows to prevent the reading and copying of the Web application source code which may represent an intellectual property.
   

Developer's comments


Q: Did you design and develop this component on your own?

KB_Soft: Not quite. Our Customer provided us with the preliminary version of the component's source code. This code already implemented the primary (minimum) command set of the SMB protocol. To put it more
  precisely, its NT LM 0.12 dialect. But the component did not work correctly. There was a bug buried somewhere in the code depths, which did not allow the program to read the files from the ZIP archive correctly.
    Q: So, the work scope was the revision of the existing code?

KB_Soft: It would be more precise to say "total redesign". After we had found out and eliminated the cause of the bug that appeared while reading the documents from the ZIP archive, we had to redesign almost all the component object model (because of some objective technical reasons agreed with the Customer).
  Q: What was the most difficult?

KB_Soft: Debugging and testing the component was the most difficult task. For example, we had to use a sniffer utility that listened to the network dialog between our C�� Server and a Client application. Then we analyzed the dumps of this exchange (the SMB package sequence) in order to find out the causes of the component failures and improper functioning.
   
Q: As far as I know, the SMB protocol itself is rather well-documented. There are a lot of sources and resources describing the main communicational principles and packet formats.

KB_Soft: That is true. The task seems to be rather simple. The SMB protocol is really rather well-documented and specified. The packet formats of any command are well-known. But when you need to make the component work on all NT platforms (from XP down to NT4), a bulk of small non-documented peculiarities, commands and differences in the application's behavior on different Windows platforms arises. And a single inaccuracy is enough in the only packet padding bit to cause the exchange
  process to crash on a certain platform. Whereas the same Server component source code will work with this application correctly under the other three Windows operating systems. The same is fair for work with the .NET Web applications and communication with the Framework and IIS. To tell the truth, in this case the main stumbling block was the security system the .NET Framework implements. Though there were plenty of other difficulties and peculiarities here, not to mention the non-documented SMB commands.