1
Getting Error in Clustered Environment for DocumentUltimate
Question asked by Cliff Akers - 1/10/2020 at 10:24 AM
Answered
I am attempting to view a document using DocumentUltimate in an ASP.NET clustered environment. The viewer works perfectly when navigating directly to each individual node. But when the cluster name is used in the URL, DocumentUltimate throws an error and will not load the document, "Status: parsererror HTTP 200: SyntaxError: Unexpected token < in JSON at position 0". The error looks like it might be occurring in PrepareDocument. I have opened a ticket but have heard nothing back. Any ideas?

2 Replies

Reply to Thread
0
Cem Alacayir Replied
Employee Post
But when the cluster name is used in the URL, DocumentUltimate throws an error and will not load the document, "Status: parsererror HTTP 200: SyntaxError: Unexpected token < in JSON at position 0".  
What is the URL you are setting? Are you setting the value to documentViewer.Document property?

Note that, documentViewer.Document property does not support HTTP or FTP URLs but it supports UNC paths
Create a Network Share on the machine and use that UNC Path.

//Using a UNC share for document location
//User Name can be speficied as Domain\User, User@Domain (UPN format), MachineName\User
//or User (local user). If a value contains semi-colon character, that value should be enclosed
//in single quotes (eg. Password='PASSWORD') or double quotes (eg. Password="PASSWORD").
documentViewer.DocumentLocation = @"Path=\\server\share; User Name=USERNAME; Password=PASSWORD";
//Same as above
documentViewer.DocumentLocation = new PhysicalLocation
{
    Path = @"\\server\share",
    UserName = "USERNAME",
    Password = "PASSWORD"
};

//Now set Document property as a relative path for this location.
//In this example "\\server\share\SomeFolder\Document.docx" will be loaded
documentViewer.Document = @"SomeFolder\Document.docx";

0
Cliff Akers Replied
Marked As Answer
In some scenarios the Document was being set, in others the DocumentSource was being set, but in either case, the viewer was throwing an error. After working with our networking/infrastructure team, we determined that the cause of the error was due to the WAF (web application firewall).

Reply to Thread