Building and Running the code - Zaid-Safadi/DICOMcloud GitHub Wiki
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:
-
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
-
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:
-
Using SqlPackage.exe: http://stackoverflow.com/questions/20513530/how-to-publish-dacpac-file-to-a-sql-server-database-project-via-sqlpackage-exe-o
-
using SQL Server 2012 with Management Studio: https://davejsteele.wordpress.com/2013/10/21/how-to-import-azure-bacpac-sql-backup-file-into-sql-server-2012/
-
Deploy to Azure Database: https://azure.microsoft.com/en-us/documentation/articles/sql-database-import/
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.