Skip to content

Remote Raster and Traces Layer Sources

In MO Desktop, remote raster layer and traces layer based on external dfs2 files can be configured.

These layers will be added to MO Web if the DHI Web API has read access to their remote sources (dfs2 files). This can be achieved by copying the respective dfs2 files to the App_Data folder of DHI Web API.

Optional configuration of a different directory for external dfs2 files

To make a different directory accessible, the following steps can be done:

In case the demo installation with IIS Express is used, the currently logged on user has to have access to the dfs2 files. Using the Windows File Explorer, the respective rights can be granted.

In case the DHI Web API has been deployed to IIS:

  • In IIS: Activate Authentication and set it to Application Pool Identity.
  • In File Explorer: Edit the Security options of the raster folder and add the ApplicationPool of DHI Web API with the respective rights.

Adding connections for traces layer

For each traces layer, a respective connection has to be added to App_Data\connections.json. The installed version contains a template. According to the location of the traces layer source, the ConnectionString value has to be adapted. Instead of using [AppData] which allows to define relative paths to the App_Data folder of DHI Web API, an absolute path can be set (e.g., C:\\Program Files (x86)\\DHI\\MIKE OPERATIONS WEB\\2023\\Web\\App_Data\\Forecast.dfs2).

"mo-traces": {
    "$type": "DHI.Services.TimeSteps.Web.TimeStepServiceConnection, DHI.Services.TimeSteps.Web",
    "ConnectionString": "[AppData]dfs2\\Forecast.dfs2",
    "ServerType": "DHI.Services.Provider.MIKE.Dfs2TimeStepServer, DHI.Services.Provider.MIKE",
    "Name": "Dfs2 traces connection",
    "Id": "mo-traces"
}