Problem rendering images

3 posts, 0 answers
  1. Harsimrat
    Harsimrat avatar
    14 posts
    Member since:
    Nov 2014

    Posted 28 May Link to this post

    Our Images are on Azure Blob Storage and it needs a special SAS token to access (https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1).

    We generate the Url on runtime and return it to the report viewer with valid SAS (proper Url), and sometimes the images render and other times it just gives 403.

    An error has occurred while processing PictureBox 'Images':
    Invalid image data.
    ------------- InnerException -------------
    The remote server returned an error: (403) Forbidden.

    Even if the images render in the viewer, when we go try to generate a PDF, it always throws the above error.

    Harsimrat

     

  2. Neli
    Admin
    Neli avatar
    172 posts

    Posted 31 May Link to this post

    Hi Harsimrat,

    For the images that are not rendered correctly, I suspect that the SAS Token contains sequences of characters that are like URL encoded symbols, and our tool decodes them. For example: %2F is accepted as  "/", e.g. forward slash - check HTML URL Encoding Reference, and for that reason the exception is thrown because the link is not already the same. This is a known issue which is already resolved and the fix will be included in our Service Pack which will be released in the middle of June 2019.

    As a workaround, you may implement a UserFunction which uses a custom logic to avoid this URL encoding, e.g. to take the URL to the image and resolve it to a Bitmap to be passed as a value to the PictureBox.

    Regards,
    Neli
    Progress Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. Harsimrat
    Harsimrat avatar
    14 posts
    Member since:
    Nov 2014

    Posted 31 May in reply to Neli Link to this post

    Thank you very much for the workaround, it worked successfully.
Back to Top