Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, October 2, 2018 9:00:52 PM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

I would like to deploy the document viewer demo to the IIS.
However, when I run the web, I got the error "Cannot reach the LEADTOOLS Documents Service.\nVerify that the service path is correct, then refresh the application."

How should I deploy and set the service path for the "DocumentsService"?
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, October 3, 2018 2:41:03 PM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Hello,

For the Document Viewer demo I'm assuming you're referring to the App1 demo? If so, you'll need to configure your Documents Service URL by modifying the "serviceHost" value within the serviceConfig.json file. The path for this file in the full installation is:
LEADTOOLS 20\Examples\JS\Documents\DocumentViewer\Clients\Apps\App1\site\serviceConfig.json

You will also be required to deploy the Documents Service. This can be done quite easily by deploying the entire DocumentsService folder via IIS:
LEADTOOLS 20\Examples\JS\Documents\DocumentViewer\Services\DocumentsService

Most of these files are not required, so in a production setting you'll want to remove them, however for testing purposes I suggest deploying it in its entirety. To check the service was deployed properly, browse to one of the following URLs:
  • <Documents Service URL>/index.html
  • <Documents Service URL>/api/Test/Ping
If you have configured it properly, you should see isLicenseExpired reporting as "false", that the cache is accessible, and the OCR status set to 2 (running). If you'd like an example Ping response from a correctly configured service, simply use our hosted demo to compare with:
https://demo.leadtools.com/JavaScript_DocumentViewer_Service/api/Test/Ping

Here is a sample response I received from the URL just above:
Code:
{"message":"Ready","time":"2018-10-03T15:43:47.8085516-04:00","isLicenseChecked":true,"isLicenseExpired":false,"kernelType":"RELEASE","isCacheAccessible":true,"ocrEngineStatus":2,"serviceVersion":"1.5.0.0","kernelVersion":"20.0.0.25","multiplatformSupportStatus":"Ready","userData":null}

There is some additional information within the Documents Service demo here:
LEADTOOLS 20\Examples\JS\Documents\DocumentViewer\Services\DocumentsService\Resources\development.html

Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#3 Posted : Wednesday, October 3, 2018 10:00:04 PM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

If my site host is "http://mysite", Files are save at "c:\inetpub\wwwroot\mysite"
The viewer can be loaded at "http://mysite/index.html

I put DocumentsService folder as "c:\inetpub\wwwroot\mysite\DocumentsService"
My serviceConfig.json is like follows

"serviceHost": "http://mysite",
"servicePath": "",
"serviceApiPath": "api",

But I still got the error. Moreover, I can't find /api/Test/Ping in my <Documents Service URL>, could you please let me know how can I get a copy?

 
#4 Posted : Thursday, October 4, 2018 10:53:03 AM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Hello,

You aren't passing the correct URL path, subfolders must be specified in the URL, for example:
If "http://mysite" is hosting "C:\inetpub\wwwroot\mysite"
"C:\inetpub\wwwroot\mysite\some\path" will be hosted at "http://mysite/some/path"

You will need to use "http://mysite/DocumentsService" as the serviceHost. Alternatively, you can leave serviceHost unmodified, and instead use "DocumentsService" as the servicePath. The Document Viewer uses the following URL structure for pinging the service:
<serviceHost> / <servicePath> / <serviceApiPath> /Test/Ping

Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#5 Posted : Thursday, October 4, 2018 8:00:46 PM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

I found the error is

jquery-1.12.4.min.js:4 POST http://mysite/DocumentsService/api/Test/Ping 500 (Internal Server Error)

So I suspect the actual issue is that I do not have the folder of "api/Test/Ping".

Actually, I do not find the mentioned folder from the example, could you please send me a copy of "Test"?

 
#6 Posted : Thursday, October 4, 2018 11:25:08 PM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

File Attachment(s):
doc1.docx (289kb) downloaded 169 time(s).
 
#7 Posted : Thursday, October 4, 2018 11:26:28 PM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

I have captured the error, could you please help to advice?
 
#8 Posted : Friday, October 5, 2018 10:55:48 AM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Hello,

I'll try to summarize how you'll need to fix the issue:

  • When deploying the Documents Service you will need to ensure the DLLs you are loading match the architecture of the IIS or IIS Express you are deploying to. This involves building the project through Visual Studio with either 64-bit or 32-bit, then copying the DocumentsService folder to your wwwroot.
    Please note: When switching between 32-bit and 64-bit you may have to manually delete the "bin" folder to ensure it pulls the correct DLLs
  • You will need to ensure the service is configured with the new location of the OCR engine runtimes. By default, these are loaded from LEADTOOLS 20\Bin\Common\OcrLEADRuntimes, however when deploying this path will not be valid. For the OCR runtimes, you will need to specify the lt.Ocr.RuntimeDirectory key of the local.config file.

Please go through all the options within the local.config file of the Documents Service, and ensure all values are supplied and valid when deployed.

Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#9 Posted : Monday, October 8, 2018 5:04:28 AM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

I am still very confused on the procedures to deploy DocumentsService.
All variables in the default local.config are blank.
I saw that the documentviewer demo has used 32-bit library, so I think I need to enable 32-bit in IIS.

I tried all your suggestion, but seemed information in such pieces, I cannot figure out a way to deploy it.

Is it possible for you to prepare a guide to teach me how to deploy from C:\LEADTOOLS 20\Examples\JS\Documents\DocumentViewer\Services\DocumentsService tp C:\inetpub\wwwroot\DocumentSerivces?
 
#10 Posted : Monday, October 8, 2018 3:47:14 PM(UTC)
Anthony Northrup

Groups: Registered, Tech Support, Administrators
Posts: 199

Was thanked: 28 time(s) in 28 post(s)

Hello,

Can you please follow the instructions listed on the following forum post and let me know if you have any further questions?
https://www.leadtools.com/support/forum/posts/t12617-HOW-TO--Deploy-the-Documents-Service-to-IIS

Thanks,
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 
#11 Posted : Monday, October 8, 2018 8:20:02 PM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

Thank you for your detailed guide.

However, I cannot find all the setting as you mentioned, including
local.config (the value of the lt.Cache.Directory setting)

I wonder if the deployment cannot be done on evaluation copy?

Actually, it is very high chance for me to purchase the SDK, originally, I am try to purchase after full test.



 
#12 Posted : Tuesday, October 9, 2018 1:48:48 AM(UTC)
Vicki2018

Groups: Registered
Posts: 29

Thanks: 3 times

Hi, thank you for your support.
I can deploy Documents Service now. The problem is caused by 32-bit dll that could not be run on Server 2012.
This ticket can be closed. Thx
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.113 seconds.