The following are instructions on how to manually add a Shop Floor Insight service for another environment. There are many possible configurations, and this article is intended to help guide you towards the manual setup for the most common scenarios encountered while manually adding another service. This example attempts to reduce the steps needed when the majority of the tasks need to be done manually with an administrative command prompt.
You can host connections to different Business Central environments on the same Windows server or Azure VM. Each connection needs a separate service, application folder, and listening port.
These instructions cover Business Central Online using OAuth service-to-service authentication. They are not comprehensive for all possible permutations.
1. Copy the Existing Service
- Open Services (
services.msc). Open the existing Shop Floor Insight service’s properties and note its executable path and Log On account. - Copy its complete application folder, including subfolders, to a separate location, such as
C:\SFI-MyExample. - Choose an unused service name and port. The examples below use
SFI-MyExampleand port8002; replace them as needed.
2. Edit the Copied Configuration
Open C:\SFI-MyExample\IW.TimeCollectionModule.Service.exe.config in a text editor.
In the target Business Central environment and company, open Shop Floor Setup and copy Webservice Configuration URI.
Update these entries in the copied configuration:
| Entry | Change |
|---|---|
DynamicsNavUri |
Set its to the target Webservice Configuration URI. |
Client endpoint ending /Codeunit/TCMClientState |
Replace the Business Central base URI, retaining this suffix. |
Client endpoint ending /Codeunit/TCMCustomFieldMgmt |
Replace the Business Central base URI, retaining this suffix. |
Every baseAddress under system.serviceModel/services |
Change the local listening port to 8002, retaining the scheme, hostname, and /TCM... path. |
ServiceAppender and ClientAppender log file paths |
Use separate filenames or folders for this service. |
HtmlFolder, LanguageFolder, and LicensePath |
If populated, review any absolute paths and point them to the copied resources where appropriate. |
Under IW.TimeCollectionModule.Common.Properties.Settings, configure:
| Setting | Value |
|---|---|
DynamicsNavWebServiceAuthenticationMode |
OAuthS2SClientCredentials |
OAuthTenant |
Target Microsoft Entra tenant ID |
OAuthClientID |
Application client ID |
OAuthClientSecret |
Client secret value |
For NAV_Binding, use security mode="Transport" and transport clientCredentialType="None".
Follow Configure OAuth Service-to-Service Connections to authorize the application and assign permissions in the target environment.
Save the file, preserving valid XML.
3. Register the Windows Service
Open Command Prompt as administrator and run:
sc.exe create SFI-MyExample binPath= "C:\SFI-MyExample\IW.TimeCollectionModule.Service.exe" type= own start= auto DisplayName= "Shop Floor Insight - Test2"
In services.msc, open the new service’s Log On tab and configure the intended Windows service account. Give that account access to the copied application folder and permission to write its logs.
Reserve the URL for that same account:
netsh http add urlacl url=https://+:8002/TCM/ user="DOMAIN\ServiceAccount"
Replace DOMAIN\ServiceAccount with the service’s Windows account. If the copied service uses HTTP, use http:// instead.
4. Configure HTTPS and Network Access
For HTTPS, the certificate must also be bound to the new port. Display existing bindings:
netsh http show sslcert
For an IPv4 wildcard binding, reuse the existing certificate hash, application ID, and certificate store:
netsh http add sslcert ipport=0.0.0.0:8002 certhash=CERTIFICATE_THUMBPRINT appid= certstorename=MY
Replace the placeholders with the existing binding’s values; use its actual certificate store name. For hostname or specific-IP bindings, follow Microsoft’s HTTP binding instructions.
Allow the new TCP port through Windows Firewall and any applicable Azure network security rules.
5. Start and Test
sc.exe start SFI-MyExample
Open https://your-server-name:8002/TCM using the hostname covered by the certificate. Confirm that the welcome screen appears and that the client accesses the intended environment and company. Check the new service’s log if it cannot connect.
Related Articles
Still need help?
Ask other Business Central users in the Insight Works community, or send the details to the support team. Include the steps you took and any error message you saw.