File not loaded

After hosting the doconut viewer project on iis server, the document does not load in it whereas the same is working fine with localhost running through the Visual Studio project.
image.png (21.5 KB)

@Hitendc,

I have some questions for you, and I appreciate your time answering them.

Are you using .NET Framework or .NET Core for your project?

Is the license located in the corresponding place, depending on the previous answer?

Is that the domain to which the license was made for?

Can you open the website on a different browser?

When you mention that localhost works fine via Visual Studio, I assume you are not talking about the same machine. Can you make it run in your local IIS? not IIS Express? So we can be sure the project you have can run fine independently from Visual Studio…

Thanks in advance for the time you take to answer my questions.

@carlos.molina

Thank you for your quick response,
Please find the replay against each of your query.

Are you using .NET Framework or .NET Core for your project?
:heavy_check_mark: .NET Framework

Is the license located in the corresponding place, depending on the previous answer?
:heavy_check_mark: Yes, the license copied to the bin directory as suggested.

Is that the domain to which the license was made for?
:heavy_check_mark: Yes, dcpharmacyportal.co.uk

Can you open the website on a different browser?
:heavy_check_mark: Yes we tried in edge and firefox also

When you mention that localhost works fine via Visual Studio, I assume you are not talking about the same machine. Can you make it run in your local IIS? not IIS Express? So we can be sure the project you have can run fine independently from Visual Studio.
:heavy_check_mark: From Visual Studio, it works fine
:heavy_check_mark: From hosted on IIS server over INTRANET, it does not work.

Regards

@Hitendc,

Is it possible to create a sample project very lightly where this issue happened, and share it with me?

You do not need to include the DLLs or the license.

I just realized I answered the question in the other forum. Not sure if it’s the same team, but you posted a zip file in another thread.

@carlos.molina, i am sorry about that it is totally different team and by mistake we post under different thread.

Anyways i will look into the suggestion you shared and will update you back.

Still Not Working On IIS Server.

image.png (25.4 KB)

@Hitendc,

After testing the code you provide and seeing it works by changing how to load the file. And other users not experimenting with the same issue led me to say it is a problem with how the file is being handled.

To clarify the implication of the statement, you say. It does not work on IIS even when the file is physically on the same app, right? Can you show me that code, please? Because I tested that scenario, and it works.

For the team to figure out the issue, it is good to dissect the problem first. That is why I mention starting with the simplest solution: displaying a fixed file from the same project. Test that out, then carry on with the other changes, so they can figure out the issue.

This will mean no config path or variable reading. A simple test that reads a hardcoded path with a file in the same application.

EDIT: this is my reply from the other post. I moved it so it does not get lost.

@Hitendc,

I used your source, but I changed a bit the way the file was loaded and the project works. I used a local file.

The project was hosted on a Windows server with IIS. I also run it locally on my IIS Express and my local IIS.

I am guessing there is a problem with how the file is passed. Maybe the file is not accessible via the URI created.

I would suggest starting with a local file., and then going on by creating a URI from a file in the same server and then a URI of a file in the intranet.

Hi Team,

The document we are trying to open is type of pdf and the path which we are trying to open is local drive path as per your last suggestion.

Can we arrange the remote session support this will help to come out of this problem very quickly.

As the source are the same which i have shared you before.

Request you to arrange remote support by AnyDesk or any other options for quick resolution.

Best Regards

@Hitendc,

Sadly, this forum is the only way we have to provide support. We do not do phone calls or web conferences.

I keep thinking about the issue you are facing. If you like, can you share the demo you made reading the local file that still had the issue with me?

The change I made in the sample project you provided to load the file was:

hello, why I can’t see images in this post?

@abdllahmohmd,

I do not know. I just tested it with a different ISP and the image load fine.

But do not worry as I will put the code in text below here:

ViewBag.ViewerScripts = viewer.ReferenceScripts(); // Please make sure you have copied Doconut.lic in bin folder
ViewBag.ViewerCSS = viewer.ReferenceCss();         // Download link provided in trial email   
ViewBag.ViewerID = viewer.ClientID;
ViewBag.ViewerObject = viewer.JsObject;

var token = viewer.OpenDocument(Server.MapPath("~/files/Sample.doc"));   // open default document (optional)

if (token.IsNullOrWhiteSpace())
{
    throw new Exception(viewer.InternalError);
}

I copied in the code section the ViewBag lines, not because I changed them but to give you an idea of where I made the change.

You can see how I open the document differently. But that is it. Everything else stayed the same.

@carlos.molina, thanks its working and we are able to see the documents but it shows only first page of document and rest pages and thumbnail preview blank.

refer the link below

Best Regards,

@Hitendc,

Can you provide a document with no private information so I can test this out, please?

Below document is not rendering properly.

NotLoad.pdf (91.2 KB)

@Hitendc,

Based on the demos provided, I made a local app, and the document load correctly. I even loaded it on the public demo we have on our Doconut site, and it loads fine.

So the issue may be in the application and not the DLLs.

The document loaded on another demo:

Can you try running one of the sample code demos without modifying it and then try to run and load the same file you sent me?

We cannot discard the possibility of an issue in the webserver too.

Edit: in the screenshot, it does not show clearly that the other pages load correctly, so here is another screenshot with the second page being displayed: