case 4632 - reports render under IIS: the report page's API calls are relayed by the server
Inside IIS (in-process) AyaNova has no port of its own, so the report page could not reach the API: user reports called http://127.0.0.1:<request port> (reset on https), notification reports 127.0.0.1:7575 (refused). Under IIS the page's requests under the API URL are now intercepted and made by the server (util/ReportApiRelay.cs) to the local address and port a user's request arrived on, with its host name and scheme; notification reports use the latest signed-in request, else the override. Outside IIS nothing changes. The notification token check requires a request from this machine, no longer host 127.0.0.1. Manual (IIS install, override page) and changelog updated. Deferred: emailed PDF content type application/pdf/pdf. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,6 +37,7 @@ IN PROGRESS
|
||||
- Linux: Ubuntu 24.04 and 26.04 are now tested and supported. On Ubuntu 24.04 and newer the .NET runtime is installed from Ubuntu's own package archive.
|
||||
- Docs: updated the [Linux server](ops-install-linux-server.md), [Linux desktop](ops-install-linux-desktop.md), [Windows local network](ops-install-windows-lan.md) and [Windows IIS](ops-install-windows-iis.md) installation and upgrade instructions for .NET 10 and Ubuntu 24.04 / 26.04.
|
||||
- Docs: updated the database password guidance in the installation and [backup](ops-form-backup.md) documentation.
|
||||
- Windows IIS: reports, including reports attached to customer notifications, now render under IIS with any site bindings, HTTPS included, without the [report rendering API URL override](ops-config-report-rendering-api-url-override.md) setting. See [report rendering under IIS](ops-install-windows-iis.md#report-rendering-under-iis).
|
||||
- Windows: the installers no longer give all local users write access to the AyaNova program folder; only administrators can change files there. Upgrading removes the earlier write access.
|
||||
- Windows: the local network installer and the [local network](ops-install-windows-lan.md) and [IIS](ops-install-windows-iis.md) installation instructions now link to the official PostgreSQL download page (the third-party guide linked before is no longer available), and the configuration examples assume PostgreSQL 18.
|
||||
- Docs: the Windows installation instructions now state that only one type of AyaNova 8 installation (single user, local network or IIS) can be on a computer at a time.
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
The report rendering api override setting is used in situations where report rendering code is unable to contact the local AyaNova api server via it's localhost address.
|
||||
|
||||
**IIS:** as of AyaNova 8.3.0 this setting is no longer needed when AyaNova runs inside IIS. AyaNova sends the report's requests to the AyaNova server itself, to the same address and site name users connect to (see [report rendering under IIS](ops-install-windows-iis.md#report-rendering-under-iis)). A value set for an earlier version does no harm and can be removed.
|
||||
|
||||
The symptom of this issue is reports failing to render with an error displayed containing text similar to "JobFailed: PuppeteerSharp -> Evaluation failed: TypeError: Failed to fetch at ayPostToAPI"
|
||||
|
||||
Reports are rendered by a "headless" web browser running at the AyaNova server which executes the javascript required to render the report. Most report scripts will need to contact the AyaNova API to fetch data like translations or logos. In some scenarios such as some specific configurations when using IIS as the front end for AyaNova the local headless browser is prevented from contacting the AyaNova server due to accessing it via the `localhost` address. In these situations it's necessary to tell the script to use an alternative address.
|
||||
|
||||
@@ -390,15 +390,13 @@ Let's Encrypt provides free SSL certificates and lists [several Windows clients]
|
||||
|
||||
The very first time a report is rendered in AyaNova there will be a delay while the Chromium browser report rendering components are installed.
|
||||
|
||||
#### Report rendering error
|
||||
#### Report rendering under IIS
|
||||
|
||||
In some cases there may be a futher setting required for report rendering.
|
||||
Reports, including reports attached to customer notifications, render under IIS with any site bindings, HTTPS included, and no further setting is needed. When AyaNova runs inside IIS, the requests a report makes to the AyaNova server are sent by AyaNova itself to the same address and site name that users connect to.
|
||||
|
||||
If you render a report and see this error:
|
||||
Earlier versions of AyaNova needed the [AYANOVA_REPORT_RENDER_API_URL_OVERRIDE](ops-config-report-rendering-api-url-override.md) setting under some IIS configurations. If it is set from an earlier version it does no harm and can be removed.
|
||||
|
||||
`JobFailed: PuppeteerSharp -> Evaluation failed: TypeError: Failed to fetch at ayPostToAPI`
|
||||
|
||||
You will need to set the [AYANOVA_REPORT_RENDER_API_URL_OVERRIDE](ops-config-report-rendering-api-url-override.md) setting in the [AyaNova server configuration](#5-ayanova-server-configuration) to your AyaNova server's external URL address to enable report rendering for your configuration.
|
||||
If a report fails with an error that mentions "AyaNova API request ... failed", the error text says why. For example, the site's SSL certificate must be valid for the site name users connect to.
|
||||
|
||||
#### Getting started and using AyaNova
|
||||
|
||||
|
||||
Reference in New Issue
Block a user