Install and Configure the LEADTOOLS Medical Web Service - Angular JS

This tutorial shows how to install and configure the LEADTOOLS Medical Web Service. The Web Service is responsible for providing services to the LEADTOOLS Medical Web Viewer Demo. It has 3 groups of components, Web Services, add-ins, and Data Access Layers. The Web Services authenticate and authorize all requests before passing them to any add-ins. The add-ins use the Data Access Layers to access the database as needed. Therefore, the Web Service site needs to be able to access the SQL Server.

Overview  
Summary This tutorial covers how to install and configure the LEADTOOLS Medical Web Service
Completion Time 30 minutes
Platform JavaScript AngularJS Web Application
IDE Visual Studio 2017, 2019, Visual Studio Code - Client
Development License Download LEADTOOLS

Required Knowledge

The Data Access Layers used by the add-ins need to access the GlobalPacs.config file as well the advanced.config file. Both config files are in locations outside the Web Service's website directory and are shared by the PACS Server Framework. Some add-ins and Data Access Layer files are shared by the PACS Server Framework as well. You will need to have the LEADTOOLS SDK downloaded in order to complete this tutorial. You can find the link to download here.

Set The License File

You need to add your LEADTOOLS license file and contents of your developer key information to the Web Service site in order for it to function in release mode.

There are two methods in which the license file information can be specified for the Web Service. The simplest method is to create a Leadtools.dll.config file that will reside in the same directory as the Leadtools.dll. Whenever the LEADTOOLS (kernel) DLL is loaded, it will automatically look for this configuration file. If it is present, it will attempt to load the license information and internally call the RasterSupport.SetLicense() function for setting a license file. If the configuration file is not present or contains invalid license information, the SDK will run in evaluation mode. In evaluation mode, it will run for a period of 60-days with a licensing dialog. After this period, the SDK will generate exceptions and no longer function.

There is a starter configuration file in the <LEADTOOLS_INSTALLDIR\Bin\DotNet4\Win32\ and x64 directories. You can copy it, or use the following listing (they are the same). In the configuration file, specify the license information in the LeadtoolsLicenses element:

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <configSections> 
        <section name="LeadtoolsLicenses" type="System.Configuration.NameValueFileSectionHandler" /> 
    </configSections> 
    <LeadtoolsLicenses> 
        <add key="C:\LEADTOOLS21\Support\Common\License\LEADTOOLS.lic" value="CONTENTS OF KEY FILE" /> 
    </LeadtoolsLicenses> 
</configuration> 

Note:   The value attribute contains the contents of the KEY file, rather than the path to the file itself.

Folder Structure

The entire web service’s site folder structure is contained in the folder:

<LEADTOOLS_INSTALLDIR>\Examples\DotNet\PACSFramework\MedicalWebViewer\Leadtools.Medical.WebViewer.WCF\

Note:   The entire Leadtools.Medical.WebViewer.WCF folder is required.

Application Pool

Open the Internet Information Services (IIS) Manager. Right-click on Application Pool and select Add Application Pool. Add an application pool specifically for use with the Web Service using its default settings, except for the following:

Add Web Application Site

Using the Internet Information Services (IIS) Manager, add a Web Application site, specifying the root directory for the Web Service as the physical path (the default root directory name is Leadtools.Medical.WebViewer.WCF.).

Also specify that the Web Application site will use the Application Pool you created specifically for the Web Service site.

Add Application menu button.
Add application dialog box and settings.

For this example the Alias is set to MedicalWebService. Therefore, the service will be available at http://localhost/MedicalWebService/.

Web.config File

The Web Service site contains a web.config file which contains application-specific information the Web Service needs to know in order to function properly. The following listing describes the application-specific contents of the web.config file that will need to be configured on each deployed machine.

appSettings

An example of a time when a store would occur would be when a user saves a Secondary Capture image or Presentation State (Annotations) from the web client to the server.

Run the Service

You can quickly verify that the service is working by opening a browser and navigating to:

http://localhost/MedicalWebService/
LEADTOOLS WCF medical web service running successfully

Wrap-up

This tutorial showed how to install and configure the LEADTOOLS Medical Web Service, to provide services to the LEADTOOLS Medical Web Viewer.

See Also

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