Skip to content

Overview

LocalFS extension allows other apps to access local file system on some server/computer without user intervention. You can use it for scheduled jobs or other functionality to download/upload files, monitoring local folder etc.

To be able to use it, you need to install windows service on the server/computer, which will deliver needed functionality for Business Central.

How it works

See Kine's blog for generic info about the architecture.

What you need

  1. LocalFS service installer (contact us)
  2. Azure WCF Relay (Pricing)
  3. Business Central AppSource app Navertica Local FS Connector

Which functions are available

LocalFS have these functions:

  • CheckIfFolderExists(Path):Bool
  • GetListOfFiles(Path,Pattern):ListOfFiles
  • CreateFolder(Path)
  • DeleteFile(Path)
  • DownloadFile(Path):Stream
  • UploadFile(Path,Stream)
  • MoveFile(Path,NewPath)

All functions are limited to selected folder on the server, where the LocalFS Service is installed. This is security feature which limits where the service have access to. This is part of the setting of the service.

When you run the installer, you need to fill few parameters: Installer Screen 1

  • Relay Namespace - the namespace as defined on your Azure Relay
  • Relay Service Pefix - constant, which will be added to computer name as part of the Relay URL
  • Shared Access Key - Azure Relay Access key as set on your Azure Relay

Installer Screen 2

  • API User - user name which must be passed to the service to allow connection
  • API Password - password which must be passed to the service to allow connection
  • Root Folder - folder on the computer, where the service is installed, into which the service will have allowed access
  • Local endpoint - address on which the service will be listening for local connections

How to use the app

Add dependency to the app and define variable of type codeunit "NVR LFS Service Management". Use this codeunit to call the functions for specified Local FS Connector Setup.

The table Local FS Connector Setup keeps info about different endpoints you have installed:

  • PC Code - identifier of the setup/connection
  • URL - URL of the LocalFS Service endpoint (you can find ths on the Azure WCF Relay page or you can use local endpoint if you are running on-prem)
  • UserName/Password - info for authenticating to given service. Values are set when service is instaled

Disabling Azure Proxy connection

If you are using the LocalFS in OnPrem environment, you can disable the Azure Proxy connection (endpoint for webHttpRelayBinding) by removing this node from the .config file:

Endpoint Config

If you disable this binding and restart the service, you can use the local endpoint (http://localhost:8787 by default) to connect to the service from your Business Central server.