Blazor WebAssembly: PDF Viewer AjaxHeaders

Using 18.4.033

Our services are behind an API. Authentication headers could be passed using the AjaxHeaders property of PdfViewerAjaxRequestSettings or is it only for internal use?


Thanks for your support.

13 Replies 1 reply marked as answer

DM Dhivyabharathi Mohan Syncfusion Team January 8, 2021 01:59 PM UTC

Hi Hacinto, 
 
Thank you for contacting Syncfusion support.  
 
We have exposed the property  PdfViewerAjaxRequestSettings  as public in our PDF Viewer. So, we request you to use this property by using below code snippet. We have shared the sample for your reference. 
  
Code Snippet: 
 
 
<PdfViewerAjaxRequestSettings AjaxHeaders="Headers"></PdfViewerAjaxRequestSettings> 
 
@code{ 
    SfPdfViewer PdfViewer; 
 
    public List<AjaxHeader> Headers = new List<AjaxHeader>() { new AjaxHeader { HeaderName = "Authorization", HeaderValue = "Bearer 64565dfgfdsjweiuvbiuyhiueygf" } }; 
     
} 
 
 
Please try it and let us know if you have any concerns about this. 
 
Regards, 
Dhivya. 


Marked as answer

HA Hacinto January 8, 2021 10:28 PM UTC

That works. Thanks for the quick response.


MM Michael Milone February 3, 2022 07:24 PM UTC

This does not work on latest syncfusion version 19.4.0.49



DM Dhivyabharathi Mohan Syncfusion Team February 4, 2022 09:47 AM UTC

Hi Michael, 
 
We were able to reproduce the reported issue “Ajax Headers is not sending in the Load request while loading the PDF document in Blazor”. We will check and provide further details on February 8, 2022. 
 
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team February 8, 2022 02:25 PM UTC

Hi Michael, 
 
 
We have confirmed the reported issue “Ajax header is not set to the load request in the Blazor PDF Viewer” as a defect and the fix for the changes will be included in our upcoming weekly NuGet release on February 23, 2022. You can track the status using the below feedback link, 
 
 
 
 
Regards, 
Dhivya. 



DM Dhivyabharathi Mohan Syncfusion Team February 24, 2022 03:33 AM UTC

Hi Michael, 

 
We have fixed the reported issue and the fix was included in our latest weekly NuGet release v19.4.0.53. Kindly upgrade to that version to get the issue resolved. 

 
Packages:     
Client  Blazor     
  
Blazor Sever      
  

 

 
Regards, 
Dhivya. 



BH Ben Hoe April 20, 2022 05:18 PM UTC

Hi - this doesn't work on 

Nuget release 20.1.0.50 either





BH Ben Hoe April 21, 2022 10:25 AM UTC

I set the headers as you specify, but I get the following error:

System.InvalidOperationException: Misused header name, 'Authorization'. Make sure request headers are used with HttpRequestMessage, response headers with HttpResponseMessage, and content headers with HttpContent objects.



VS Vasugi Sivajothi Syncfusion Team April 21, 2022 12:33 PM UTC

Hi Ben,


We were able to reproduce the reported issue with the provided details. We will analyze further on this and update you with more details on April 25, 2022.


Regards,

Vasugi.



SK Shamini Kiruba Sobers Syncfusion Team April 25, 2022 05:23 PM UTC

Hi Ben,


We have validated the issue “Ajax request settings to add header name throws an exception” and logged it as a defect. The fix for the issue will be available in our upcoming weekly NuGet release on May 11, 2022. You can track the status of the issue through the following link.


Feedback: https://www.syncfusion.com/feedback/34409/ajax-request-settings-to-add-header-name-throws-an-exception


Regards,

Shamini



VS Vasugi Sivajothi Syncfusion Team May 11, 2022 12:35 PM UTC

Hi Ben,


Due to the 2022 Vol 1 SP release, we don’t have a weekly release for this week. However, the fix will be included in our SP release which is expected to be rolled out on May 12, 2022. We will let you know once the package is available.


Regards,

Vasugi



VS Vasugi Sivajothi Syncfusion Team May 12, 2022 02:09 PM UTC

Hi Ben,


Sorry for the inconvenience. The fix will be included in our SP release which is expected to be rolled out on May 13, 2022. We will let you know once the package is available.


Regards,

Vasugi



VS Vasugi Sivajothi Syncfusion Team May 13, 2022 10:57 AM UTC

Hi Ben,


We are glad to announce that our Essential Studio 2022 Volume 1 Service Pack Release V20.1.0.55 is rolled out and is available for download under the following link.


We have fixed the reported issue and it was included in our volume 1 SP release V20.1.0.55. Kindly upgrade to that version.


https://www.syncfusion.com/forums/174993/essential-studio-2022-volume-1-service-pack-release-v20-1-0-55-is-available-for-download


We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.


Regards,

Vasugi


Loader.
Up arrow icon