FactoryTalk-Optix Optix Sample DownloadFileToWebClient
FactoryTalk-Optix Optix Sample DownloadFileToWebClient
1. BaseDirectory: The base directory from which files will be listed and served.
2. ServerAddress: The address on which the HTTP server will listen.
3. ServerPort: The port on which the HTTP server will listen.
Usage
Execute the Runtime and navigate to http://127.0.0.1:8081 using the WebBrowser
to see the list of files in the configured folder (and subfolders)
Click on any file to initiate the download operation
NetLogic description
1. Start the HTTP Listener: The Start method initializes and starts the HTTP listener. It
reads the configuration variables, validates them, and starts listening for incoming
HTTP requests.
2. Stop the HTTP Listener: The Stop method stops the HTTP listener.
3. Handle HTTP Requests: The OnRequest method handles incoming HTTP requests. It
supports two types of requests:
Important note
Security: This application does not support SSL/TLS. It is highly recommended to use
this application behind a reverse proxy that provides SSL/TLS support to ensure secure
communication.
Validation: Ensure that the ServerAddress and ServerPort are correctly configured
to avoid potential security risks.
Access Control: This application does not implement any form of access control. It is
recommended to restrict access to trusted users only.
Directory Traversal: The application attempts to prevent directory traversal attacks by
serving files only from the specified base directory. However, additional validation and
security measures should be implemented as needed.
Known issues
The web server cannot be embedded using the FactoryTalk Optix WebBrowser object
in the NativePresentationEngine due to CORS limitations
Disclaimer
The examples provided are to be used as a reference for building your own application and
Releases
No releases published
Packages
No packages published
Languages
C# 100.0%