This agent is used by the WebServer and SecureWebServer to handle requests for files from the file system.
If the file is an ASP.NET file, it will be executed using the ASP.NET environment on the server and the output will be sent to the requestor. If the ASP.NET code references other assemblies or .dlls, include copies of these .dlls in the same folder as your ASP.NET file.
The HTTPFileServerAgent supports the following Props:
service_name
The name this agent uses to register with Service Manager. The default value is HTTPFileServerAgent
html_directory
The path to the directory where HTML files are served from. Defaults to ./
default_index
The default files (separated by commas) to serve when no filename is specified in the HTTP request. This prop is set to index.html by default, which means requests for /public_html/my_stuff/ will be served the file /public_html/my_stuff/index.html.
allow_directory_lists
If this is set to yes, this agent will display links to all files in a directory when a web request specifies a directory instead of a file. The default value is no
dont_index_list
This is the list of files that shouldn't appear in directory index listings, can use '*' to denote a wildcard. This property is not used if the allow_directory_lists property is set to false. By default, this property isn't set.
alpha_sort_index
If set to true, directory lists will be sorted in alphanumerical order. This property is set to true by default.
aspnet_config_file
The path to an XML file containing ASP.NET configuration and debugging information. Defaults to web.config.
preload_aspx_pages
A list describing the ASP.NET pages that should be pre-loaded when the agent starts. This is not required but it makes pages load faster the first time they are requested by the user. To pre-load ASP.NET pages the agent must know the file location and it's URL relative to the server root. The list of files is in the format: [WebPath1],[FilePath1];[WebPath2],[FilePath2] (or [WebPath1],[FilePath1],[VirtualDirectory1] if the page is in a virtual directory), and so on, where the first item in each pair is the path to the file relative to the root of the web server (e.g. /aspapp/myfile.aspx) and the second is the path to the file on the hard disk (e.g. d:\htmldir\aspapp\myfile.aspx). This property is not set by default.
aspx_assemblies
An optional comma separated list of assemblies referenced by ASP.Net pages. Assemblies appearing in this list will be copied to the \bin subdirectory of the folder where the ASP.Net page is located. The files will be re-copied and re-loaded if a newer version becomes available. Use the full path. Here is an example value for this property: c:\app\foo.dll,c:\anotherapp\bar.dll
file_buffer_size
The size of the buffer to read and write static files to the Socket connected to the client.
virtual_directories_config
The config file that defines virtual directories. This is a text file with alternating lines of physdir:[physical path] and virtpath:[virtual path], where the [physical path] can be a fully qualified pathname to an existing physical directory or a relative path and the [virtual path] is a URI path starting with the / character that is to be mapped to the physical directory. The virtpath: MUST follow a physdir:. An example of a virtual directory config file:
A set of directory names that will be denied access if they appear in the URI path. They are separated by commas and must not include any / path separators.
restricted_access_404
If this property is set to true, attempted accesses to restricted directories will return a 404 Not Found instead of the default 403 Forbidden. Set this to true if you want the added protection of less information disclosure of making access to a restricted directory appear as if the directory isn't there at all.
For virtual hosts (serving different websites with unique domain names a.k.a. multihoming), start multiple HTTPFileServerAgent instances and give each one unique service_name and html_directory prop values. Include the domain name (or the protocol, http:// or https://) with the URI in the agent's service_name. Here are some examples of valid service_names:
Public static (Shared in Visual Basic) members of this type are
safe for multithreaded operations. Instance members are not guaranteed to be
thread-safe.