Remote Directory Components

tastaserverdirectory.gif      tastaclientdirectory.gif      tastaopenremotefile.gif      tastasaveremotefile.gif



The ASTA Remote Directory features allow you to "publish" a server directory. When a server publishes a directory, Asta clients can open files from and save files to that remote server directory. This is a convenient feature, but it has limitations and should be used with care. You should not publish a directory with thousands of files and dozens of subdirectories for performance reasons, and for security reasons you should not publish a root directory or other sensitive information. We recommend that you create a stand-alone directory dedicated to the sole task of publishing and accepting files.

Like many ASTA features, this one is a tandem implementation, you must coordinate actions on the server and the client sides or the feature will not operate properly.

To set up a server, you must drop a TAstaServerDirectory object onto the server application. Then you must assign the object to the AstaServerSocket.DirectoryPublisher property. Once that property is assigned, you can call the AstaServerSocket.PubishServerDirectories method.

The Server Directory Publisher dialog is raised by the PublishServerDirectories method. This dialog allows you to set several options; the directory, an alias name, and whether or not you want the directory to be automatically published every time the server starts up. In one examplet, I chose to publish the C:\eetemp directory. Since I didn't want the users to know the actual name of the server directory, I used the alias TestFiles.

Since this is a permanent feature of my application, I have selected the "Auto-Publish on Server Restart" checkbox. The information will be written to and automatically read from the registry automatically each time the server is started.

Now that the server side has been set up, you must attend to the client side. You need to add an AstaClientDirectory object to your form. The AstaClientDirectory.AstaClientSocket property should be assigned to the client's AstaClientSocket object

Then add an AstaOpenRemoteFile and/or and AstaSaveRemoteFile object to your project. The AstaClientDirectory properties of these objects should be set to the AstaClientDirectory1 object that you just previously added to the form. These objects will retrieve files from and save files to the server directories that are "published" at the server. The execute methods of the AstaOpenRemoteFile and the AstaSaveRemoteFile objects call up a select file dialog with the server's "published" directories.



ASTA Overview ProviderBroadCasts Server Side Programming