The following pop up only seems to happen on our live environment even though we have a valid license and works perfectly fine locally

We've been receiving the following pop up,



intermittently

on our live environment but locally it seems to be working fine.

We have a setup of 3 nodes with a loadbalancer and we've manage to make the pop up go away by switching off all the nodes and just running one on the server but that's not a long-term solution.

Please note that we are currently running .Net core 5, together with syncfusion/ej2-vue-pdfviewer": "17.4.51 npm PACKAGE and nuget:

Syncfusion.ej2.aspNet.core 19.2.0.48

Syncfusion.ej2.Pdfviewer.AspNet.Core.Windows 19.2.0.48


Can you please advise on how we can resolve this issue?


Thank you in advance.




3 Replies

SK Shamini Kiruba Sobers Syncfusion Team January 18, 2022 03:19 PM UTC

Hi Brian, 

We have to use the IMemoryCache to store some document data for rendering the PDF document. If the scaling is enabled, then the request will send to the different server machines, but in this, the cache data will not be available. Since the memory cache will store them in RAM. For overcoming this we have provided the distributed cache(Redis) support for retrieving the stored data with different server machines and so the PDF document will get rendered in our PDF Viewer control. We have implemented the Redis cache for achieving load balancing for our web service. If you are using multiple instances by scaling in a cloud environment, we recommend using the Redis cache. 

Kindly follow the below steps for using the Redis Cache,      
   
STEP 1: To use Redis cache in PDF Viewer service, install the following NuGet package,        
                             Microsoft.Extensions.Caching.Redis        
     
STEP 2: To configure the Redis cache in the PDF Viewer service, you have to add the following changes in Startup. cs        
        
services.AddDistributedRedisCache(options =>        
{        
  options.Configuration = Configuration.GetConnectionString("Redis");                        
});        
 
STEP 3: We have to use IDistributedCache instead of IMemoryCache in PdfViewerController.cs. Please find the PDF Viewer service sample and code snippet below.        
 
PdfViewerController.cs       
private IDistributedCache _cache;       
public PdfViewerController(IHostingEnvironment hostingEnvironment, IDistributedCache cache)       
        {       
            _hostingEnvironment = hostingEnvironment;       
            _cache = cache;       
        }       
 

Kindly revert to use if you have any queries. 

Regards, 
Shamini 



BR Brian January 21, 2022 11:49 AM UTC

Hi Shamini  , thank you so much for your response, i'm happy to announce that we've manged to solve the problem by enabling 'sticky session' on loadbalancer, however, the rendering of pdf still takes 'forever' to load , it almost seems like its hanging for a while somewhere on the front end( currently using vue.js), before making the call to the service side? .Any thoughts on that maybe?



SK Shamini Kiruba Sobers Syncfusion Team January 27, 2022 03:13 PM UTC

Hi Brian, 

We were unable to replicate the issue “the rendering of pdf still takes 'forever' to load”. The sample we tried at our end can be downloaded from the following link. 



Run the web service and then the Vue sample. 

We have also captured a video while loading the PDF document with the above sample. Kindly download the same from the following link. 


You can also preview the file loading in the below online documentation link too. 

If you use the online demo URL in our serviceUrl property, an issue may occur due to some network problem. This URL is only for demo purposes, and we are updating this URL frequently based on the new changes. So, we suggest you create a web service and provide that URL in the client-side application for further processing. 
You can refer to the steps for PDF Viewer service creation from the following links. 

Kindly try the shared sample and let us know if the issue is resolved or not. If not, kindly share the modified sample or let us know the exact issue details like if the file loads finally, the time taken to hit the Load method in the server by referring to the video screenshot. This will be helpful to investigate further at our end and provide a solution. 

We can also schedule a web meeting to look into your issue on a call. So, let us know your availability for the same to resolve this issue at the earliest. 

Regards, 
Shamini 


Loader.
Up arrow icon