Deploy LEADTOOLS Document Service Core on Windows Server - HTML5 JavaScript

This tutorial demonstrates how to deploy the LEADTOOLS Document Service on a Windows Server 2019.

Overview  
Summary This tutorial covers how to host the LEADTOOLS Document Service on a Windows Service using IIS hosting.
Completion Time 30 minutes
Platform JavaScript Web Application
IDE Visual Studio 2017, 2019, Visual Studio Code - Client
Development License Download LEADTOOLS

Required Knowledge

Get familiar with the basic steps of running the LEADTOOLS Document Service by reviewing the Configure and Run the Document Service - .NET Core tutorial, before working on the Deploy LEADTOOLS Document Service Core on Windows Server - HTML5 JavaScript tutorial.

Note:

This tutorial covers how to deploy the LEADTOOLS Document Service to a Windows Server. However, the Document Service is an example project and not intended for a production environment.

Upload the Project

By following the steps in the Configure and Run the Document Service - .NET Core tutorial, the Document Service project is ready to publish. Open the command line terminal, and cd into this directory: <LEADTOOLS_INSTALLDIR>\Examples\Document\JS\DocumentServiceDotNet\core.

Insert the following command into the terminal:

dotnet publish -c Release -o DocumentServiceDlls DocumentService.csproj

This command will gather the dependencies and build the project, then output all of the dlls into the <LEADTOOLS_INSTALLDIR>\Examples\Document\JS\DocumentServiceDotNet\core\DocumentServiceDlls folder. The server requires the DocumentServiceDlls folder and the LEADTOOLS License files to run the Document Service. Upload the DocumentServiceDlls folder and the LEADTOOLS License files to the server.

Setup the Server

The Windows Server has to be configure to run the service. Login to the server and open the Server Manager.

Server manager application in the start menu

When the Server Manager launches, click the Add roles and features option in the main menu under Welcome to Server Manager. Click the Next button until you get to the Server Roles section and Select Web Server(IIS). Click Next to move onto Features.

Server roles with web server IIS selected

Under the Features section, select the following:

Click Next until you get to the Confirmation page, then click Install to install the selected features.

Confirm installation of selected features

Install the Runtime Environment

The LEADTOOLS Document Service requires the ASP.NET Core Runtime. Open a browser and navigate to https://dotnet.microsoft.com/download/dotnet-core/2.1. Install the Windows Hosting Bundle under the ASP.NET Core Runtime section.

ASP.NET Core 2.1 install page

Once the runtime environment is installed, restart the server.

Create a New User

Create a new user that will run the application and only have permission to access the Document Service. By restricting the user's permissions the server can be sure that only Document Service resources are accessed by the Document Service. First open the Windows Start Menu and select Change account settings.

Start Menu Change Account Settings

Under Other users, select Add someone else to this PC.

Click I don't have this person's sign-in information, then click Add a user without a Microsoft account. Fill out the form to create a local account. This example will use doc_service as the new user.

Create a local user account

Click Next to crete the new user.

Create the IIS Application Pool

Open the Internet Information Services (IIS) Manager.

IIS Manager search result

Right-click Application Pools, and select Add Application Pool.

Add application pool menu option

Create a new application pool. This tutorial will call the new application pool DocumentServiceAppPool. For the .NET CLR version, select No Managed Code. For the Managed pipeline mode, select Integrated. Click OK to create the application pool.

Add application pool screenshot

After the application pool has been created, open its Advanced Settings menu.

Application pool advanced settings menu option

Change the application pool's Identity to the user that was created earlier in this tutorial.

Application pool advanced settings
Change application pool identity

Click OK to apply the changes.

Create the Web Site

In the IIS Manager, right-click Sites and select Add Website.

Add website menu option

Create the Document Service website by filling out the Add Website form. Choose a name for the application, this tutorial will use DocumentService for the name. Select the application pool that was created earlier in this tutorial. Lastly, select the physical path to the Document Service Dlls folder. Click OK to create the website.

Add website for project

Run the Project

Open a browser on the server and navigate to http://localhost. Alternatively, you can navigate to http://<Server IP Address>:80.

Document service index running page

Note:

If the license file is not checked, make sure that the appsettings.json file configured correctly as seen in the Configure and Run the Document Service - .NET Core tutorial.

Wrap-up

This tutorial showed how to deploy the LEADTOOLS .NET Core Document Service on a Windows server.

See Also

Help Version 22.0.2021.10.18
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.