We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Pdf not showed in the shared hosting server

I'm using blazor server 20.3.0.49 and this piece of code opens my Pdf correctly in my local Pc when started from Visual Studio

@page "/help"

@using Syncfusion.Blazor.PdfViewerServer

<SfPdfViewerServer DocumentPath="@DocumentPath" Height="500px" Width="1060px" ></SfPdfViewerServer>

@code {

    private string DocumentPath { get; set; } = @"wwwroot/Docs/Serviziolavanolo.pdf";

}

When I publish the application in a shared hosting server, the pdf is not showed. Only a grey content with the toolbar perfectly visible.

I'm sure the path is correct and that the file exists.

That file and the whole docs folder has read and write permission to "Everyone"

Whereelse can be the problem ?

Thanks



9 Replies

VV Visvesvar Venkatesan Syncfusion Team October 21, 2022 07:33 AM

Hi Walter,


We need your hosting service to investigate further on this issue. Could you kindly provide your hosting service details and machine details to investigate further on this?


We also need error details also like the console window screen short on developer tools.


Regards,

Visvesvar K V



WM Walter Martin October 21, 2022 08:07 AM

I add you in attachment 2 printscreen where you can see that the page doesn't show any error message, but only a grey content instead of my pdf


The shared hosting is in a server where windows server 2022 is running and I'm using NetCore 6.0 for my blazor application

As you can see the file I want to show exists "ServizioLavanolo.pdf"

What server details do you need to know ?



Attachment: printscreen_76dbf134.zip


VV Visvesvar Venkatesan Syncfusion Team October 24, 2022 11:24 AM

Hi Walter,


Thank you for your update.


We are analyzing the reported issue and we will update further details on Oct 26, 2022.



Regards,

Visvesvar K V 



VV Visvesvar Venkatesan Syncfusion Team October 26, 2022 12:53 PM

Hi Walter,

 

After hosting the sample.

 

The x64 folder will be generated only while running the sample and only when we select a file.

 

Kindly confirm whether the x64 folder is available in the bin folder of the published folder when you try to select a file.

 

If not kindly paste the x64 folder in the deployment place to load the file.

 

Kindly revert to us if you have any concerns.

 

 

 Regards,

Visvesvar K V 



WM Walter Martin October 27, 2022 03:16 AM

Hello Visvesvar

your hint is not clear to me

I have a x64 folder in my local source folder inside /bin/release/Net6.0 with inside only one file pdfium.dll but I don't think you're talking about this folder

When I publish the application in a local folder, Visual Studio creates the structure I add you in attachment and then I copy the whole content using filezilla into the shared hosting server

In this structure there's neither 'bin' nor 'x64' folder

When I click in my link to open the pdf viewer no folders are created in the hosting server

What is not clear to me ?

Just to add more information, I selected in Visual Studio the option to deploy to a local folder in "framework dependent" mode and not in "complete" mode according to the instructions received by the hosting provider and all other applications I published in the same hosting server are working fine in this mode

Maybe it's necessary to publish in "complete" mode ? Or do you know which specific dll is necessary to work with pdfviewer ?



Attachment: lista_e35023e2.zip



VV Visvesvar Venkatesan Syncfusion Team October 27, 2022 06:54 AM

Hi Walter,


The X64 folder will be generated dynamically. As you said you have x64 folder in your source folder inside /bin/release/Net6.0 with only one file pdfium.dll.


Kindly copy this folder inside the Hosting server and paste it into the publish folder. Now the sample will work fine.


Kindly revert to us if you have any concerns.



Regards,

Visvesvar K V



WM Walter Martin October 27, 2022 07:08 AM

I forgot to write you that I already tried what you request but the result is the same

The PdfViewer has a grey content

I pasted x64 folder in the root path and also inside wwwroot path 

What else can I try to do ?



WM Walter Martin October 28, 2022 03:05 AM

If I click on the ticket number a page appeared with "Access denied"

is this normal ?




VV Visvesvar Venkatesan Syncfusion Team October 28, 2022 06:45 AM

Hi Walter,


We have created a ticket for your issue. Kindly follow that ticket for further updates regarding the reported issue.


We are closing this forum as solved.


Regards,

Visvesvar K V 


Loader.
Live Chat Icon For mobile
Up arrow icon