Specifies the options that the HttpServer class supports.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
The HttpServer class uses the ServerOptions enumeration to specify one or more options to be used when establishing a connection with a remote host. Multiple options may be specified if necessary.
Member Name | Description | Value |
---|---|---|
optionNone | No option specified. | 0 |
optionMultiUser | This option specifies the server should be started in multi-user mode, where users are assigned their own home directories and clients can access documents in those directories by including the username in the request URI. If this option is not specified, then all users will share the server root directory by default. This option does not have any effect on the maximum number of simultaneous client sessions that can be established with the server. | 1 |
optionRestricted | This option specifies the server should be initialized in a restricted mode, limiting certain functionality. The only commands accepted by the server will be the GET and HEAD commands. The server will never return a list of files if the client provides a URL that maps to a local directory and there is no default index page. Clients will not be able to execute CGI programs or scripts, and cannot access files outside of the server root directory or its subdirectories. | 2 |
optionLocalUser | This option specifies the server should perform user authentication using the Windows local account database. This option is useful if the server should accept local usernames, or if the application does not wish to implement an event handler for user authentication. If this option is not specified, the application is responsible for authenticating all users. | 4 |
optionNoIndex | This option specifies the server should not search for a default index page if the client provides a URL that maps to a local directory. By default, the server will search for a file named index.htm, index.html, default.htm, default.html or index.txt in the directory. If a file by one of those names is found, it will return the contents of that file rather than a list of files in the directory. | 8 |
optionReadOnly | This option specifies the server should only allow read-only access to files by default. If this option is enabled, it will change the default permissions granted to authenticated users. Commands that are used to create, delete or modify files on the server will be disabled by default. It is recommended that this option be enabled if the server is publicly accessible over the Internet. | 16 |
optionLockFiles | This option specifies that files should be exclusively locked when a client attempts to upload or download a file. If another client attempts to access the same file, the operation will fail. By default, the server will permit multiple clients to access the same file, although it will still write-lock files that are in the process of being uploaded. | 64 |
optionHiddenFiles | This option specifies that when a client requests a resource, the server should permit access to hidden and system files or subdirectories. By default, the server will not allow access to a hidden or system file, even if the client session has been authenticated. This option is ignored if the server is started in restricted mode. | 128 |
optionSecure | This option specifies that a secure connection using TLS should be enabled. This option requires that a valid TLS certificate be installed on the local host. The default port number for secure HTTP connections is 443. If security is enabled, all client connections to the server must be secure. Standard and secure connections cannot be shared by the same instance of the server. If your application must support both standard and secure connections, you must create two instances of the server listening on two different ports, one with optionSecure enabled and the other without. | 4096 |
optionSecureFallback | This option specifies the server should permit the use of less secure cipher suites for compatibility with legacy clients. If this option is specified, the server will permit connections using TLS 1.0 and cipher suites that use RC4, MD5 and SHA1. | 32768 |
Namespace: SocketTools
Assembly: SocketTools.HttpServer (in SocketTools.HttpServer.dll)