The SetDirectory method specifies the path to the
local directory that should be used as the root document directory for
the server.
It is recommended that you always specify an absolute path for the
server root directory. If the path includes environment variables
surrounded by percent (%) symbols, they will be automatically expanded.
If you have configured the server to permit clients to upload files,
you must ensure that your application has permission to create files
in the directory that you specify. A recommended location for the server
root directory would be a subdirectory of the %ALLUSERSPROFILE%
directory. Using the environment variable ensures that your server will
work correctly on different versions of Windows. If the root directory does
not exist at the time that the server is started, it will be created.
You cannot change the server root
directory after the server has started. To change the root directory,
you must stop the server using the Stop method and
then start another instance of the server with a configuration that
specifies the new directory.