Installing and Configuring the Web Service

Summary

Installing and Configuring the Web Service

Overview

The Web Service site is responsible for providing services to the LEADTOOLS Medical Web Viewer Demo.  It is composed of 3 groups of components: Web Services, AddIns, and Data Access Layers.   The Web Services authenticate and authorize all requests before passing them to any AddIns.  The AddIns 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.  

Also, the Data Access Layers used by the AddIns need to access the GlobalPacs.config file as well the “advanced.config” file. Both config files are in locations outside the Web Service’s web site directory and are shared by the PACS Server Framework.  Some of the AddIns and Data Access Layer files are shared by the PACS Server Framework as well.  These shared files will be identified in the next section.

Folder Structure

The entire web service’s site folder structure is contained in the folder: C:\LEADTOOLS 19\Examples\DotNet\PACSFramework\MedicalWebViewer\Leadtools.Medical.WebViewer.WCF

The following files are required for the Web Service web site to service the LEADTOOLS Medical Web Viewer Demo. This list depicts the folder structure required as well:

Root directory (Leadtools.Medical.WebViewer.WCF - This folder name can be renamed)

  • Bin
    • atl100.dll
    • EsuApiLib.dll
    • Ionic.Zip.dll
    • Leadtools.Annotations.Automation.dll
    • Leadtools.Annotations.Core.dll
    • Leadtools.Annotations.dll
    • Leadtools.Annotations.Documents.dll
    • Leadtools.Annotations.Rendering.WinForms.dll
    • Leadtools.Annotations.WinForms.dll
    • Leadtools.Codecs.Bmp.dll
    • Leadtools.Codecs.Cmp.dll
    • Leadtools.Codecs.dll
    • Leadtools.Codecs.J2k.dll
    • Leadtools.Codecs.Png.dll
    • Leadtools.Codecs.Raw.dll
    • Leadtools.Codecs.Tif.dll
    • Leadtools.DataAccessLayers.Core.dll
    • Leadtools.DataAccessLayers.dll
    • Leadtools.Dicom.AddIn.dll
    • Leadtools.Dicom.Annotations.Core.dll
    • Leadtools.Dicom.Common.dll
    • Leadtools.Dicom.dll
    • Leadtools.Dicom.Imaging.dll
    • Leadtools.Dicom.Scp.dll
    • Leadtools.Dicom.Scu.dll
    • Leadtools.Dicom.Tables.dll
    • Leadtools.dll
    • Leadtools.Drawing.dll
    • Leadtools.Forms.DocumentWriters.dll
    • Leadtools.ImageProcessing.Color.dll
    • Leadtools.ImageProcessing.Core.dll
    • Leadtools.ImageProcessing.Effects.dll
    • Leadtools.ImageProcessing.Utilities.dll
    • Leadtools.Logging.dll (shared)
    • Leadtools.Logging.Medical.dll (shared)
    • Leadtools.Medical.DataAccessLayer.dll (shared)
    • Leadtools.Medical.ExternalStore.DataAccessLayer.dll
    • Leadtools.Medical.Logging.DataAccessLayer.dll
    • Leadtools.Medical.Options.DataAccessLayer.dll (shared)
    • Leadtools.Medical.PermissionsManagement.DataAccessLayer.dll (shared)
    • Leadtools.Medical.Storage.AddIns.dll (shared)
    • Leadtools.Medical.Storage.DataAccessLayer.dll (shared)
    • Leadtools.Medical.UserManagementDataAccessLayer.dll (shared)
    • Leadtools.Medical.WebViewer.AddIns.dll
    • Leadtools.Medical.WebViewer.Annotations.DataAccessLayer.dll
    • Leadtools.Medical.WebViewer.Core.dll
    • Leadtools.Medical.WebViewer.ImageDownloadAddin.dll
    • Leadtools.Medical.WebViewer.Jobs.DataAccessLayer.dll
    • Leadtools.Medical.WebViewer.Jobs.dll
    • Leadtools.Medical.WebViewer.PatientAccessRights.DataAccessAgent.dll
    • Leadtools.Medical.WebViewer.WCF.dll
    • Leadtools.Medical.Winforms.dll
    • Leadtools.Medical.Worklist.DataAccessLayer.dll
    • Leadtools.Medical.Workstation.DataAccessLayer.dll
    • Leadtools.MedicalViewer.dll
    • Leadtools.Pdf.dll
    • Leadtools.Tasks.ServerProcess.exe
    • Leadtools.Wcf.WebHttpCorsBehavior.dll
    • mfc100.dll
    • mfc100u.dll
    • mfcm100.dll
    • mfcm100u.dll
    • Microsoft.Practices.EnterpriseLibrary.Common.dll
    • Microsoft.Practices.EnterpriseLibrary.Data.dll
    • Microsoft.Practices.EnterpriseLibrary.Data.SqlCe.dll
    • Microsoft.Practices.EnterpriseLibrary.Logging.dll
    • Microsoft.Practices.ObjectBuilder2.dll
    • Microsoft.Practices.Unity.dll
    • Microsoft.WindowsAzure.Storage.dll
    • msvcp100.dll
    • msvcr100.dll
  • AnnotationsService.svc
  • AuthenticationService.svc
  • ObjectQueryService.svc
  • ObjectRetrieveService.svc
  • PacsQueryService.svc
  • PACSRetrieveService.svc
  • PatientAccessRightsService.svc
  • StoreService.svc web.config    

Application Pool

 

Using the Internet Information Services (IIS) Manager, add an application pool specifically for use with the Web Service using its default settings, except for the following:

  • When adding the application pool, be sure to select the version of the .NET framework you intend to use.       
  • Once added, be sure to set the “Enable 32-Bit Application” setting to “true” if you are using the 32 bit versions of our .NET DLLs.
  • If you are using a Service Account, you will need to modify the “Identity” setting, setting it to use your User Service Account.  Otherwise, adjust the “Identity” setting to use “LocalSystem”.

Add Application

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.

Web.config

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

  • 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 on our web site.
  • key - Our software will use the alpha-numeric key specified for unlocking the features of the toolkit in this application.  More information about this feature can be located on our web site.
  • 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. o 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 store operation by the Web Addin’s Store Addin (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.

LEADTOOLS Licensing

You need to add your license file and 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 "C:\LEADTOOLS 19\Bin\DotNet\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="" value="" />
</LeadtoolsLicenses>
</configuration>

Here is a mock example of a modified config file:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="LeadtoolsLicenses" type="System.Configuration.NameValueFileSectionHandler" />
</configSections>
<LeadtoolsLicenses>
<add key="C:\LEADTOOLS 19\License\MyLicFile.lic" value="abc123xyz" />
</LeadtoolsLicenses>
</configuration>

**Note that the value attribute contains the contents of the KEY file, but not a path to the file itself. 

Verify that the service has been set up correctly

You can quickly verify that the service is working by browsing to the Web Application in the IIS Manager, selecting the web service site, selecting the content view tab at the bottom, then right-clicking on a *.svc file and selecting “Browse…” from the context menu. The following figure shows the context menu.

 

Selecting Browse in the context menu opens the browser, as shown below:

 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Medical Web Viewer