Unplanned
Last Updated: 30 Jul 2025 08:49 by ADMIN
J.T.
Created on: 23 Jul 2025 14:50
Type: Feature Request
1
Option to add a 'User-Agent' header to requests made by the Reporting Engine

Hi Team,

I have a request for being able to add the `User-Agent` header to reporting calls. We've ran into some image hosting sites that will not resolve image links properly if the user-agent is not present in the request and returns a 403 Forbidden error. Any browser that passes the user-agent parameter can resolve this link.

https://cms5.revize.com/revize/cityofwillmar/_assets_/images/logo.png

But telerik will return this error:

Telerik.ReportDesigner.exe Error: 0 : An exception has occurred while processing 'pictureBox1' item:
System.Net.WebException: The remote server returned an error: (403) Forbidden.
   at System.Net.WebClient.DownloadDataInternal(Uri address, WebRequest& request)
   at System.Net.WebClient.DownloadData(Uri address)
   at Telerik.Reporting.Processing.Imaging.ImageUtils.LoadData(String filePath)
   at Telerik.Reporting.Processing.Imaging.UrlImageItem.CreateUnderlyingImageItem()
   at Telerik.Reporting.Processing.Imaging.UrlImageItem.get_UnderlyingImageItem()
   at Telerik.Reporting.Processing.Imaging.UrlImageItem.CreateImageInfo()
   at Telerik.Reporting.Processing.Imaging.IImageInfoMapExtensions.StoreImageData(IImageInfoMap imageInfoMap, IImageItem imageItem, ICache cache)
   at Telerik.Reporting.Processing.PictureBox.ResolveImage(Object value)
   at Telerik.Reporting.Processing.ReportItemBase.ProcessElement()
   at Telerik.Reporting.Processing.ProcessingElement.Process(IDataMember dataContext)

Currently, the only way around this is to fetch the images with a custom user function and returns the images to the Reporting Engine as a byte array or other supported format. It's a lot of overhead for something that could simply be toggled on an off, so I think this would be a nice feature addition. 

Thanks,
J.T.

1 comment
ADMIN
Todor
Posted on: 30 Jul 2025 08:49

Hello J.T.,

Thank you for the detailed explanation of the scenario and the issue.

Indeed, we use the default settings of the System.Net.WebClient and don't add headers to the request.

We will discuss the requirement within the team and probably add a configuration that lets report creators add headers to the PictureBox item requests when fetching the image from a URL.

As a token of gratitude for your valuable suggestion, we updated your Telerik points.

Regards,
Todor
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.