Skip to content

Building and Running the code

Xeos edited this page Feb 12, 2017 · 5 revisions

1. Open the Solution in Visual Studio 2015

The code is built with .NET 4.5.2 and Visual Studio 2015.

To compile and run the code, open the solution file DICOMcloud.sln, this will load all the projects and let you build the code.

2. Create The Database

In order to run the server, you will need to create a SQL database first and configure the DICOMcloud.Wado.WebAPI project.

The database schema can be created in MS SQL Server or Azure Database by:

  1. Use the project DICOMcloud.SqlServerDatabase to directly publish the database to any SQL server from Visual Studio. This a SQL Server Database project that contains the SQL scripts to create the database and can be published from Visual Studio to a SQL database (on-prem, Azure). For more details about this approach you can check this CodeProject Post

  2. The build output of the DICOMcloud.SqlServerDatabase project produces a dacbac file "DICOMcloud.SqlServerDatabase.dacbac" under .\DICOMcloud.SqlServerDatabase\bin_{configuration}_. There are multiple ways to deploy/publish a dacpac file, here are some good URLs to get you started:

3. Update the configuration

After you have your database created, you can configure the web application DICOMcloud.Wado.WebAPI project by updating the web.config appSettings setions:

  • Set the connection string to your database:

<add key="app:PacsDataArchieve" value="TODO: ENTER YOUR SQL DATABASE CONNECTION STRING" />

  • Set the storage location of your DICOM images in the appSettings. This can be either a local file or an Azure blob storage connection. The code supports both formats.

<add key="app:PacsStorageConnection" value="UseDevelopmentStorage=true;" />

<add key="app:PacsStorageConnection" value="C:\DICOMcloud\Storage" />

You can find these two settings by searching for the word "TODO:"

4. Run the DICOM Server

Now you can run the server from Visual Studio using IIS Express. Set the DICOMcloud.Wado.WebApi as your startup project and press F5.