Server JS Installation
Prerequisites
- IIS (Internet Information Services) installed
- ASP.NET Core Runtime 9.0.2
- Admin rights on your Windows machine
Installation
- Download serverjs.zip.
- Unzip it to
C:\inetpub\wwwroot\YourWebsite. - Run
inetmgr(IIS). - Add a website:
- Right-click
Sitesand selectAdd Website - Name:
YourWebsite - Path:
C:\inetpub\wwwroot\YourWebsite - Port:
80or custom - Click
OK
- Right-click
- Start the site and test it:
- In IIS, right-click the site and select
Manage Website > Browse - Or go to
http://localhost; if the installation was successful, you should see a home page like this - To test the PowerPoint export functionality, click
Test PowerPoint Export
- In IIS, right-click the site and select
Visio-Specific Instructions
- Make sure you can create and save a Visio file.
- Run
dcomcnfgas administrator. - In the right pane go to
Console Root > Component Services > Computers > [My Computer] > DCOM Config. - Right-click
Microsoft Visio 2003-2010 Drawingand selectProperties. - Open the
Securitytab and inLaunch and Activation PermissionselectCustomize > Edit > Add > Advanced > Find Now, then selectIIS_IUSRS, clickOK, enable allAllowpermissions, and clickOKagain. Do the same forAccess Permissions, then clickApply. - On the
Identitytab selectThe interactive user. - Click
Apply. - Start the website and open
http://localhoston the same machine, then clickTest Visio Export.
Remote server session requirement
To export Visio files, Visio needs an open user session to run. On a remote server, you can keep the current session active after closing Remote Desktop by adding a Scheduled Task.
- Press
Win + R, typetaskschd.msc, and press Enter. - In Task Scheduler, click
Create Taskin the right-hand pane. - Give the task a name, then select
Run whether user is logged on or notandRun with highest privileges. - Open
Triggersand clickNew. - For
Begin the task, selectOn disconnect from user session, then clickOK. - Open
Actionsand entertsconinProgram/script, and2 /dest:consoleinAdd arguments, where2is the number of the current session.
Usage
To use your own Server JS, add the serverUrl option to the OrgChart JS configuration:
javascript
var chart = new OrgChart('#tree', {
serverUrl: "https://YourWebsite.com"
});