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 Web Application |
IDE | Visual Studio 2017, 2019, Visual Studio Code - Client |
Development License | Download LEADTOOLS |
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.
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.
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.
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:
If you are using a Service Account, you will need to modify the "Identity" setting to use your User Service Account. Otherwise, adjust the "Identity" setting to use "LocalSystem".
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.
For this example the
Alias
is set toMedicalWebService
. Therefore, the service will be available at http://localhost/MedicalWebService/.
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.
license - Our software will use the file specified (full path to the file must be specified) for unlocking the features of the toolkit in this application. More information about this feature can be located in our SetLicense documentation.
key - Our software will use the alpha-numeric key specified for unlocking the features of the toolkit in this application.
ClientAe - When querying a remote PACS, this value will be used as the calling AE title in the CFind request. This value is initially set by the CSPACSConfigDemo_Original.exe application under Main Client
.
ClientIP - When querying a remote PACS, this value will be used as the calling AE title’s IP Address in the CFind request. This value is initially set by the CSPACSConfigDemo_Original.exe application, although it cannot be explicitly set in the demo. The value is obtained automatically using Windows API functions.
ClientPort - When querying a remote PACS, this value will be used as the calling AE title’s port in the CFind request. This value is initially set by the CSPACSConfigDemo_Original.exe application under Main Client
.
ServerAe - When retrieving from a remote PACS, this value will be used as the destination AE title in the CMove request. This value is initially set by the CSPACSConfigDemo_Original.exe application under Storage Server
.
ServerIP - When retrieving from a remote PACS, this value will be used as the destination AE title’s IP address in the CMove request. This value is initially set by the CSPACSConfigDemo_Original.exe application although it cannot be explicitly set in the demo. The value is obtained automatically using Windows API functions.
ServerPort - When retrieving from a remote PACS, this value will be used as the destination AE title’s port in the CMove request. This value is initially set by the CSPACSConfigDemo_Original.exe application under Storage Server
.
globalConfigPath - This is the full path (path + filename) to the GlobalPacs.config
file. The location of this file is necessary in order for the Web Service and AddIns to obtain the connection strings to database providers and configuration information for particular database access agents. It is used in the AddInsFactory
constructor during the creation of each of the Data Access Agents, in the AddInsFactory.cs
file.
storageServerServicePath - This is the full directory path to the Storage Server's Service directory. This directory contains the advanced.config
file which holds all the settings for the Leadtools.Medical.Storage.Addin.dll classes. The settings are used during a web store operation by the add-in on the Store (Leadtools.Medical.WebViewer.Addins.dll
).
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.
You can quickly verify that the service is working by opening a browser and navigating to:
http://localhost/MedicalWebService/
This tutorial showed how to install and configure the LEADTOOLS Medical Web Service, to provide services to the LEADTOOLS Medical Web Viewer.