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.