WebEngine
Where to find the configuration file
WebEngine reads/writes this XML file at runtime:
/Configuration/WebEngine.xml (relative to the app runtime directory)
If the file does not exist, WebEngine creates a default one automatically.
WebEngine properties you can use
Set these in `Configuration/WebEngine.xml`:
| Key | Value |
| BASE_URL | Base URL of your API (example: `https://localhost:7071`) |
| GET_CONTENT_ENDPOINT | Endpoint to download content (supports `{id}`) |
| UPDATE_CONTENT_ENDPOINT | Endpoint to update content (supports `{id}`) |
| DELETE_CONTENT_ENDPOINT | Endpoint to delete content (supports `{id}`) |
| DOCUMENT_LIST_ENDPOINT | Endpoint to get document list |
| DOCUMENT_INFORMATION_ENDPOINT | Endpoint to get document metadata (supports `{id}`) |
| AUTH_HEADER_NAME | Optional auth header key |
| AUTH_HEADER_VALUE | Optional auth header value |
| TIMEOUT_SECONDS | HTTP timeout in seconds |
| ALLOW_SELF_SIGNED_CERTIFICATES | `true/false`; useful for localhost/dev certs |
Tip: Keep endpoint values relative (like `/api/test/GetContent?id={id}`) unless you intentionally want a full absolute URL.
How to test (using `EngineTestController.cs`)
IceViewer has a built-in TestController for testing purpose, called EngineTestController. The EngineTestController have the following built-in endpoints:
- `GET /api/test/GetContent?id=1`
- `PUT /api/test/UpdateContent?id=1`
- `DELETE /api/test/DeleteContent?id=1`
- `GET /api/test/GetDocumentList`
- `GET /api/test/GetDocumentInformation?id=1`
Quick test flow:
1. Set `BASE_URL` to your running app URL (for example `https://localhost:7071`).
2. Keep the default `/api/test/...` endpoints in `WebEngine.xml`.
3. Call a WebEngine action (for example document list/content) from your app.
4. Verify data is returned from the test controller endpoints above.
That’s it — if those endpoints respond correctly, your WebEngine configuration is working.
