Deploying the PACS Storage Server and Medical Web Viewer to Microsoft Azure App Services (ASP.NET)

Last updated on July 7th, 2020

Summary

This topic describes how to deploy the PACS Storage Server and Medical Web Viewer to Microsoft Azure App Services. An app service is a Platform-as-a-Service (PaaS). Deploying the medical web viewer using App Services is not as straight-forward as deploying it to a virtual machine (VM). Nor do App Services provide as much control over the machine(s) hosting the services as Virtual Machines provide. However, managing App Services is easier when done through the Azure portal. For more information, refer to https://learn.microsoft.com/en-us/azure/architecture/guide/technology-choices/compute-decision-tree.

Prerequisites

  • A valid Microsoft Azure Subscription
  • The latest LEADTOOLS Main or PACS setup (installed), along with a configured PACS Storage Server and a configured Medical Web Viewer. Installation and configuration is necessary because some of it needs to be copied over to the App Service.

Solution Components

  1. An App Service to host the web services
  2. An App Service to host the web client
  3. A SQL Database to host the database
  4. A Storage Account to store DICOM files
  5. A LEADTOOLS Storage Server running on a local Windows machine LEADTOOLS Storage Server is the easiest way to manage patients/studies and their corresponding records, and provides easy setup/management for your cloud storage.

Deploy the Storage Account

Perform the following steps to add a new, classic Storage account:

  1. From the Azure portal select > New > Storage > Storage Account
  2. Add a blob container
  3. Get the name of the account, container and the Primary access key (these will be needed later)

Now, use LEADTOOLS Storage Server to setup this cloud storage to be used for your patients/studies records: Azure Cloud Storage

Deploy the SQL Database

Run the "CSPacsDatabaseConfigDemo.exe" demo to install your database in Azure, for more information see: Creating a Microsoft Azure-hosted Database

Deploy the Web Service to an Azure App Service

Prepare service to have minimum configuration dependencies
  1. If you have a valid license, find the (local.config) file and make sure the license is in embedded form: <add key="lt.License" value="xR0M.......16cvBp0P8fYee"/>
    value will have the code that comes between ([License] License = <doc><ver>2.0</ver><code>) and (</code></doc>)
  2. Find the (local.config), search for (lt.Medical.Pacs.GlobalConfig) key, it should point to a valid GlobalPacs.config

    Open that (GlobalPacs.config), search for (connectionStrings), find the configuration that has the name LeadStorageServer, (e.g. <add name="LeadStorageServer21_64" connectionString="Data Source=(local);Failover Partner=;Initial Catalog=storage;Integrated Security=True;User ID=;Password=;Pooling=True" providerName="System.Data.SqlClient" />)

    Copy this configuration, and paste it in the (connectionStrings.config) found in the project folder.

    Go back to (local.config) and clear the value of (lt.Medical.Pacs.GlobalConfig) key

Publish using Visual Studio

Easiest way to publish this web service is by using MS Visual Studio:

Create an ASP.NET web app in Azure

Deploy Project to Azure

Publish manually

Alternatively, to do this manually, perform the following steps:

  1. Add a new Web App: from the Azure portal > New > Compute > App Services > Web App
  2. Name the Web App “MedicalViewerServices”
  3. Go to your new App Service > Overview, get the FTP URL, and be sure to get the FTP user name as well
  4. Use your favorite FTP client (for example, Windows Explorer) to browse to that site location
  5. Navigate to site/wwwroot/
  6. Copy files from the local installation as follows:

Copy Files from the Local Installation to the Azure App Service

One of the pre-requisites is to install the LEADTOOLS setup, and configure the Medical Web Viewer. Files from the setup and configuration need to be copied over to the App Service's site. To do so, perform the following steps:

  1. Copy the Service Binaries and Config/Definitions to the Azure App Service

    1. Go to the web service folder on disk (for example, <installation>\Examples\Viewers\DotNet\MedicalWebViewer\Medical.WebViewer.Asp\Medical.WebViewer).

    2. Copy the contents of this folder to the App Service’s (site/wwwroot/) using the FTP client.

    3. Copy everything in the BIN folder except for the following files: Leadtools.Tasks.ServerProcess.exe

    Note: The default platform is win32, so be sure you are copying the 32-bit binaries from the LEADTOOLS installation folder.

    Note: Currently the free plan on Azure lets you deploy 32-bit web applications. To deploy 64-bit applications, from the Azure portal select the App Service and click Settings > Platform. Change the platform to 64-bits.

  2. Create a new Folder called (App_Data) inside the (site/wwwroot/).

  3. Copy the (PACS server folder). The default name is (L21_PACS_SCP32). It can be found on <installation>\bin\Dotnet4\Win32 if you are installing the win32.

Edit the Config Files for the Azure App Service

  1. From (site/wwwroot/), edit the local.config file as follows:

    1. In appSettings, change the following values:

    storageServerServicePath > set to App_Data\L21_PACS_SCP32\

    Caching.Enabled > set to false

    Caching.Lifetime > set to 00:00:00

    For more information about using the settings in the local.config file to manage caching, refer to Managing the Medical Web Viewer Custom Cache.

    1. Enable CORS. For testing, allow all (*) to connect. Enabling CORS helps when testing the web service from your machine. Be sure to remove this when finished.

Create and Deploy the Web Client

  1. Add a new Web App. Azure portal > New > Compute > App Services > Web App

  2. Name your Web App “MedicalViewer21”

  3. Go to your new App Service > Overview, get the FTP , and make sure you get the FTP user name as well

  4. Use your favorite FTP client (e.g., Windows Explorer) to browse to that site location

  5. Navigate to site/wwwroot/

Copy Files for the Web Client from the Local Installation

Once again it is necessary to copy files from the installed LEADTOOLS setup, and the configured Medical Web Viewer. Perform the following steps:

  1. Copy the Service Binaries and Config/Definitions To do this, go to the web service folder on disk (e.g., (installation)\Examples\Viewers\DotNet\MedicalWebViewer\MedicalWebViewerDemo)

  2. Copy the contents of this folder to the App Service’s (site/wwwroot/) using the FTP client.

Edit the index.htm file

Search for the tag <base href and make sure the value is set to empty/blank:

<base href="" />

Edit the Scripts/Config.js file

From (site/wwwroot/), open the web.config file and change the value of the (serviceUrl) to point to the web service deployed on Azure. You can get the web service URL from the Azure portal.

Launch/test the web client

Get the URL from the Azure portal and navigate to it using an internet browser. You should be able to login and use most of the functionality of the web viewer

Using the LEADTOOLS Storage Server with this Configuration/Setup

You can use the Storage Server demo to browse and manage your data if you modify its globalPacs.config and advanced.config files the same way you modified them for the App Service (for win32 these files are found in the Bin\Dotnet4\Win32 & Bin\Dotnet4\Win32\L21_PACS_SCP32). Using the Storage Server demo is optional, but can be very helpful.

Known Limitations/Issues

Because of the nature of the platform Azure service applications use, the following functionalities do not work:

  1. Secondary Capture

  2. Print to PDF with Annotations burned-in (realized)

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

LEADTOOLS Medical Web Viewer

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