naveen sanagasetti
naveen sanagasetti

Reputation: 1

What causes a HTTP 404 error when using GroupDocs viewer?

I'm using an XPS file reader to produce HTML output via the GroupDocs Viewer, and it's giving a result in HTML format using the UseHtmlBasedEngine property but giving me error in top corner of viewer like HTTP Error 404.0 not found.

        string fileName = (sender as LinkButton).CommandArgument;
        string scriptLibraries = Viewer.CreateScriptLoadBlock().LoadJquery().LoadJqueryUi().ToString();

        string inlineDocPreviewScript = Viewer.ClientCode()
            .TargetElementSelector("#divShow")
            .FilePath(fileName)
            .EnableRightClickMenu(true)
            .ShowThumbnails(true)
            .OpenThumbnails(true)
            .ZoomToFitWidth()
            .Quality(100)
            .MinimumImageWidth(ImageWidth)
            .UseHtmlBasedEngine(true,true,true,true)
            .ToString();

        HeadControl.Controls.Add(new Literal() { Text = scriptLibraries });
        BodyControl.Controls.Add(new Literal() { Text = inlineDocPreviewScript });

How to resolve HTTP 404.0 not found error in this scenario?

Upvotes: 0

Views: 320

Answers (1)

Denis Gvardionov
Denis Gvardionov

Reputation: 26

Looks like you have changed the root URL of the application or have generated document’s cache with a URL and then changed it or deployed the application to another server. To resolve the issue, simply delete the Viewer cache – the "temp" folder, which can be found in the root storage path (which you’ve set in the .SetRootStoragePath() method).

If this will not help you, please share with us the following details: which type of the project you use (We3b Forms or MVC) and a code example of the Viewer initialization and web.configs.

As for the reading html and image files from different folders - please provide more info about the use case because it's not very clear what you actually want to do. Please post your request on our support forum at: http://groupdocs.com/Community/Forums/Default.aspx

Upvotes: 0

Related Questions