Show / Hide Table of Contents

Server JS Installation

Prerequisites

  • IIS (Internet Information Services) installed
  • ASP.NET Core Runtime 9.0.2
  • Admin rights on your Windows machine.

Installation

  1. Download serverjs.zip
  2. Unzip to: C:\inetpub\wwwroot\YourWebsite
  3. Run inetmgr (IIS)
  4. Add Website
    • Right-click Sites → Add Website
    • Name: YourWebsite
    • Path: C:\inetpub\wwwroot\YourWebsite
    • Port: 80 or custom
    • Click OK
  5. Start Site & Test
    • In IIS → right-click site → Manage Website → Browse
    • Or go to http://localhost, if the unstallation was successfull you should see a home page that looks like this
    • To test the PowerPoint export functionallity click "Test PowerPoint Export" button
Visio-Specific Instructions
  1. Make sure that you can create and save Visio file.
  2. Run dcomcnfg as admin.
  3. On the right pane go to Console Root > Component Services > Computers > [My Computer] > DCOM Config
  4. Right click on Microsoft Visio 2003-2010 Drawing and click on Properties
  5. Go to Security Tab and in "Launch and Activation Permission" select Customize -> Edit -> Add -> Advanced -> Find Now -> Select IIS_IUSRS -> OK -> check all Allow permitions and click OK again. Do the same for Access and Permissions section and click Apply.
  6. On Indentity tab select The interactive user
  7. Click Apply
  8. Start the web site and open this link on the same machine: http://localhost and click on Test Visio Export

To be able to do the export Visio needs an open user session to run.

To achieve this on a remote server, we add a Shedule Task that continue the cuurent session when we close the remote desctop connection.
  1. Press Win + R, type taskschd.msc, and press Enter.
  2. In the Task Scheduler window, click on Create Task in the right-hand pane.
  3. Giva e name of the tast and Select Run whether user is logged on or not and Run with highest privileges
  4. Go to Triggers and click New
  5. For a Begin the task select On disconnect from user session and Click OK
  6. Go to Actions and enter tscon in Program/script, and 2 /dest:console in Add arguments, where 2 is the number of the current session.

1. Install .NET 9 Runtime

Run the following commands:

 
         


wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt update
sudo apt install -y dotnet-sdk-9.0

2. Graphic packages:

 
         
sudo apt update && sudo apt install -y libnss3 libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libdrm2 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libasound2t64 libpangocairo-1.0-0 libxshmfence1 libxkbcommon0
and
 
         
sudo apt update && sudo apt install -y libxfixes3 libxrender1 libxcursor1 libxi6 libxtst6

3. Download Server JS

Download the package here: serverjs.zip

4. Extract the Archive

Unzip the downloaded file:

 
         
unzip ServerJS.zip

5. Change settings for Linux

Open appsettings.json and make the bellow changes:
Change the temp folder to /tmp

 
             
"TempDir": "/tmp"

uncomment the commented row:
 
             
"Args": [ "--no-sandbox" ],

6. Run Server JS

Navigate to the ServerJS folder and start the application:

 
         
cd ServerJS
dotnet serverjs.balkan.app.dll

The server should now be running.

Usage

To use your own Server JS, you need to add the serverUrl option to the OrgChart JS configuration:

 
                                                           
var chart = new OrgChart('#tree', {
    serverUrl: "https://YourWebsite.com"
});