www.astatech.com Manual Central ASTA Users Guide Remote Directory Support





Asta Technology Group
Welcome to the world of wireless enabled web services
advanced search
ASTA in 60 seconds
ASTA in action
Developer details
Free Internet tools
Demos
Business views
White papers
Tutorial center
Testimonials
Asta online help
ASTA Users Guide

Remote Directory Support

Key Client Server
Properties AstaClientDirectory: AstaClientSocket, AstaOpenRemoteFile: AstaClientDirectory, AstaSaveRemoteFile: AstaClientDirectory AstaServerSocket: DirectoryPublisher
Methods AstaOpenRemoteFile: Execute, AstaSaveRemoteFile: Execute AstaServerSocket: PublishServerDirectories
Events    

The ASTA Remote Directory features allow you to "publish" a server directory. When a server publishes a directory, AstaClients 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 -- in the sample project I added a menu that allows the user to configure the server at run time.

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 the example on the left, I have chose to publish the C:\eetemp directory. Since I don'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 setup, 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.

 

Last modified: 5/5/2002 7:32:30 AM
Copyright © 2001-2002 Asta Technology Group, Inc. Terms & Conditions     Privacy Policy     Site Map