Unplanned
Last Updated: 07 Nov 2025 09:56 by ADMIN
Scheduled for 2025 Q3
James Glinsek
Created on: 22 Apr 2025 14:30
Category: Reporting
Type: Bug Report
1
When loading ExternalStyleSheets, log an error to the trace only when the stylesheet cannot be resolved after all attemps

Currently, when using External Stylesheets in the reports, the engine tries to first load the stylesheet as an embedded resource of the assembly. If it fails to load it from the assembly, a message is written to the trace along the lines of:

ESS: Attempt to load ExternalStyleSheet from EmbeddedResource from assembly Telerik.Reporting, Version=19.0.25.211 with resource name styles.xml is unsuccessful.

After this, the engine will try other ways to resolve the stylesheet such as from URI and if it succeeds, the report will render as expected.

This can create confusion because looking at the trace, one might think that there were errors with the rendering of the report because the stylesheet did not load but it was actually successfully loaded with one of the other approaches.

It would be better to write the errors to the trace only if the stylesheet does not load after all attempts.

 

2 comments
ADMIN
Dimitar
Posted on: 07 Nov 2025 09:56

Hello James,

Thank you for the provided information!

Looking at the invalid path, it seems that the wwwroot folder is duplicated. There is a known "behavior" where the wwwroot folder gets duplicated in Azure Web apps, and I suspect this messes up the relative paths, thus the exception.

 I see that it may be possible to change the name of the created folder - https://github.com/dotnet/aspnetcore/issues/1636#issuecomment-230572166, but that probably won't help since the structure changes anyway.

I would suggest keeping the current workaround enabled, and the error message should disappear when this item is handled, since the stylesheet is found eventually.

Let us know if you have any other feedback.

Regards,
Dimitar
Progress Telerik

Your perspective matters! Join other professionals in the State of Designer-Developer Collaboration 2025: Workflows, Trends and AI survey to share how AI and new workflows are impacting collaboration, and be among the first to see the key findings.
Start the 2025 Survey
James Glinsek
Posted on: 31 Oct 2025 22:36

We are finding another error that gets logged in this same way. That error is

ESS: Invalid path for loading an external style sheet: /home/site/wwwroot/home/site/wwwroot/[reports-folder]/styles.xml

This ONLY seems to happen in our Azure App Service environment, where we run on Linux. When using a local docker container, we don't see this error. This error started happening when we changed our custom `ReportSourceResolver` to return an `InstanceReportSource`. When resolving to an `InstanceReportSource`, you have to replace in "relative path" external style sheets with a full path to the stylesheet. Like this:

telerikReport.ExternalStyleSheets.Clear();
telerikReport.ExternalStyleSheets.Add(new ExternalStyleSheet(_full_path_to_external_stylesheet));

(NOTE: That issue is discussed here: https://www.telerik.com/forums/how-to-modify-external-stylesheet-programmatically)

Anyways, as noted, when we do that locally (on Windows) or locally (on a Linux Docker Container), it works perfectly without any errors logged and reports correctly use the external style sheet. When deploying to an Azure App Service running Linux, we get that error noted above, HOWEVER, the report still works and the correct style sheet is used! So somehow, the internal Telerik code is eventually resolving the correct path to the External Style Sheet, but it is once again incorrectly logging an error at some point in the process (and apparently, it is also mangling the path at that point somehow).