Skip to content

[Bug]: Multi-tenant containers don't create correct links #4050

@tfenster

Description

@tfenster

BCContainerhelper version

6.1.9

Describe the issue

If you create a multi-tenant container and then use the share-functionality in BC, the generated link is missing the tenant parameter

Command or script used to produce the issue

New-BcContainer -accept_eula -accept_insiderEula -accept_outdated -containerName test -imageName mybc -artifactUrl (Get-BCArtifactUrl -type Sandbox -country de) -multitenant

Full output of the command or script

Downloading Platform index to C:\Users\azuretfenster\AppData\Local\Temp\bcContainerHelper.platform.json
Downloading de index to C:\Users\azuretfenster\AppData\Local\Temp\bcContainerHelper.de.json

PowerShell credential request
Using Windows Authentication. Please enter your Windows credentials.
Password for user azuretfenster: ****************

BcContainerHelper is version 6.1.9
BcContainerHelper is running as administrator
HyperV is Enabled
Host is Microsoft Windows 11 Pro - 10.0.26100.6584
UsePsSession is True
UsePwshForBc24 is True
UseWinRmSession is never
UseSslForWinRmSession is True
Docker Client Version is 28.5.2
Docker Server Version is 28.5.2
Removing Desktop shortcuts
Downloading artifact /sandbox/27.1.41698.42333/de
Downloading C:\Users\azuretfenster\AppData\Local\Temp\6656a350-13be-48dc-9992-dff6259f7ced.zip
Unpacking artifact to tmp folder using Expand-Archive
Downloading platform artifact /sandbox/27.1.41698.42333/platform
Downloading C:\Users\azuretfenster\AppData\Local\Temp\005a17d1-3671-4cc1-aafb-57660571a08e.zip
Unpacking artifact to tmp folder using Expand-Archive
Downloading Prerequisite Components
Downloading c:\bcartifacts.cache\sandbox\27.1.41698.42333\platform\Prerequisite Components\IIS URL Rewrite Module\rewrite_2.0_rtw_x64.msi
Downloading c:\bcartifacts.cache\sandbox\27.1.41698.42333\platform\Prerequisite Components\DotNetCore\DotNetCore.1.0.4_1.1.1-WindowsHosting.exe
Fetching all docker images
Fetching all docker volumes
ArtifactUrl and ImageName specified
Building multitenant image mybc:sandbox-27.1.41698.42333-de-mt based on mcr.microsoft.com/businesscentral:ltsc2025 with https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.1.41698.42333/de
Pulling latest image mcr.microsoft.com/businesscentral:ltsc2025
ltsc2025: Pulling from businesscentral
1317fe151856: Already exists
27c754a6aa9f: Pulling fs layer
686a7a84d96c: Pulling fs layer
017aa6f721c3: Pulling fs layer
35797affdcc6: Pulling fs layer
39b867a7aead: Pulling fs layer
5e9b364f8a3b: Pulling fs layer
7142a940720f: Pulling fs layer
89474dd0ce93: Pulling fs layer
4386d634b5a1: Pulling fs layer
39b867a7aead: Waiting
d3cd6f706bdc: Pulling fs layer
2d0b8a61aa10: Pulling fs layer
35797affdcc6: Waiting
626b55136edb: Pulling fs layer
5e9b364f8a3b: Waiting
7142a940720f: Waiting
285d8f32eb65: Pulling fs layer
2d0b8a61aa10: Waiting
89474dd0ce93: Waiting
626b55136edb: Waiting
285d8f32eb65: Waiting
4386d634b5a1: Waiting
d3cd6f706bdc: Waiting
686a7a84d96c: Verifying Checksum
686a7a84d96c: Download complete
35797affdcc6: Verifying Checksum
35797affdcc6: Download complete
39b867a7aead: Verifying Checksum
39b867a7aead: Download complete
5e9b364f8a3b: Verifying Checksum
5e9b364f8a3b: Download complete
7142a940720f: Download complete
017aa6f721c3: Verifying Checksum
017aa6f721c3: Download complete
4386d634b5a1: Verifying Checksum
4386d634b5a1: Download complete
d3cd6f706bdc: Verifying Checksum
d3cd6f706bdc: Download complete
2d0b8a61aa10: Verifying Checksum
2d0b8a61aa10: Download complete
626b55136edb: Verifying Checksum
626b55136edb: Download complete
285d8f32eb65: Verifying Checksum
285d8f32eb65: Download complete
27c754a6aa9f: Verifying Checksum
27c754a6aa9f: Download complete
89474dd0ce93: Verifying Checksum
89474dd0ce93: Download complete
27c754a6aa9f: Pull complete
686a7a84d96c: Pull complete
017aa6f721c3: Pull complete
35797affdcc6: Pull complete
39b867a7aead: Pull complete
5e9b364f8a3b: Pull complete
7142a940720f: Pull complete
89474dd0ce93: Pull complete
4386d634b5a1: Pull complete
d3cd6f706bdc: Pull complete
2d0b8a61aa10: Pull complete
626b55136edb: Pull complete
285d8f32eb65: Pull complete
Digest: sha256:6252b5c0a8a201b1c2404e549bf61116b067a22bcb65ff8625084ae495d6b3ed
Status: Downloaded newer image for mcr.microsoft.com/businesscentral:ltsc2025
mcr.microsoft.com/businesscentral:ltsc2025
Generic Tag: 1.0.2.83
Container OS Version: 10.0.26100.6905 (ltsc2025)
Host OS Version: 10.0.26100.6584 (24H2)
Host OS is 26100 (24H2) or above, recommended isolation mode is hyperv.
Using hyperv isolation
Files in c:\bcartifacts.cache\1owrrohp.eo2\my:
Copying Platform Artifacts
c:\bcartifacts.cache\sandbox\27.1.41698.42333\platform
Copying Database
Copying Licensefile
Copying ConfigurationPackages
C:\bcartifacts.cache\sandbox\27.1.41698.42333\de\ConfigurationPackages
Copying Extensions
C:\bcartifacts.cache\sandbox\27.1.41698.42333\de\Extensions
Copying Applications.DE
C:\bcartifacts.cache\sandbox\27.1.41698.42333\de\Applications.DE
c:\bcartifacts.cache\1owrrohp.eo2
Sending build context to Docker daemon 3.431GB

Step 1/6 : FROM mcr.microsoft.com/businesscentral:ltsc2025
---> 7d45b19bab5d
Step 2/6 : ENV DatabaseServer=localhost DatabaseInstance=SQLEXPRESS DatabaseName=CRONUS IsBcSandbox=Y artifactUrl=https://bcartifacts-exdbf9fwegejdqak.b02.azurefd.net/sandbox/27.1.41698.42333/de filesOnly=False
---> Running in d79b815da6cb
---> Removed intermediate container d79b815da6cb
---> af028b2f2299
Step 3/6 : COPY my /run/
---> cb5a53ef75f4
Step 4/6 : COPY NAVDVD /NAVDVD/
---> b7d33a4663a2
Step 5/6 : RUN \Run\start.ps1 -installOnly -multitenant
---> Running in 0ed50eb279a7
c:\run\my folder doesn't exist, creating it
Using DVD installer from C:\Run\270
Installing Business Central: multitenant=True, installOnly=True, filesOnly=False, includeTestToolkit=False, includeTestLibrariesOnly=False, includeTestFrameworkOnly=False, includePerformanceToolkit=False, appArtifactPath=, platformArtifactPath=, databasePath=, licenseFilePath=, rebootContainer=False
Installing from DVD
Starting Local SQL Server
Starting Internet Information Server
Copying Service Tier Files
C:\NAVDVD\ServiceTier\pfiles64
C:\NAVDVD\ServiceTier\System64
Copying Web Client Files
C:\NAVDVD\WebClient\pfiles\Microsoft Dynamics NAV
Copying ModernDev Files
C:\NAVDVD
C:\NAVDVD\ModernDev\pfiles\Microsoft Dynamics NAV
Copying additional files
Copying ConfigurationPackages
C:\NAVDVD\ConfigurationPackages
Copying Test Assemblies
C:\NAVDVD\Test Assemblies
Copying Extensions
C:\NAVDVD\Extensions
Copying Applications
C:\NAVDVD\Applications
Copying Applications.DE
C:\NAVDVD\Applications.DE
Copying dependencies
Importing PowerShell Modules
Restoring CRONUS Demo Database
Setting CompatibilityLevel for tenant on localhost\SQLEXPRESS
Exporting Application to CRONUS
Removing Application from tenant
Modifying Business Central Service Tier Config File for Docker
Creating Business Central Service Tier
Installing SIP crypto provider: 'C:\Windows\System32\NavSip.dll'
Starting Business Central Service Tier
Importing CRONUS license file
Copying Database on localhost\SQLEXPRESS from tenant to default
Taking database tenant offline
Copying database files
Attaching files as new Database default
Putting database tenant back online
Mounting tenant database
Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
Sync'ing Tenant
Tenant is Operational
Stopping Business Central Service Tier
Installation took 283 seconds
Installation complete
---> Removed intermediate container 0ed50eb279a7
---> fe6405f7ea98
Step 6/6 : LABEL legal="http://go.microsoft.com/fwlink/?LinkId=837447" created="202511181427" nav="" cu="" multitenant="Y" country="DE" version="27.1.41698.42333" platform="27.0.42316.0"
---> Running in 7297a7075c2b
---> Removed intermediate container 7297a7075c2b
---> f8e6eebb3195
Successfully built f8e6eebb3195
Successfully tagged mybc:sandbox-27.1.41698.42333-de-mt
Building image took 916 seconds
Using image mybc:sandbox-27.1.41698.42333-de-mt
Creating Container test
Style: sandbox
Multitenant: Yes
Version: 27.1.41698.42333
Platform: 27.0.42316.0
Generic Tag: 1.0.2.83
Container OS Version: 10.0.26100.6905 (ltsc2025)
Host OS Version: 10.0.26100.6584 (24H2)
Host OS is 26100 (24H2) or above, recommended isolation mode is hyperv.
Using hyperv isolation
Using locale de-DE
Disabling the standard eventlog dump to container log every 2 seconds (use -dumpEventLog to enable)
Files in C:\ProgramData\BcContainerHelper\Extensions\test\my:

  • AdditionalOutput.ps1
  • HelperFunctions.ps1
  • MainLoop.ps1
  • SetupVariables.ps1
  • updatecontainerhosts.ps1
    Creating container test from image mybc:sandbox-27.1.41698.42333-de-mt
    b8852b8ac463eedec39d29d0871a643f7337f7ae2f01d7023e4b2fc9ff806663
    Waiting for container test to be ready
    Initializing...
    Setting host.containerhelper.internal to 172.26.96.1 in container hosts file
    Starting Container
    Hostname is test
    PublicDnsName is test
    Using Windows Authentication
    Starting Local SQL Server
    Starting Internet Information Server
    Modifying Service Tier Config File with Instance Specific Settings
    Starting Service Tier
    Registering event sources
    Creating DotNetCore Web Server Instance
    Using application pool name: BC
    Using default container name: NavWebApplicationContainer
    Copy files to WWW root C:\inetpub\wwwroot\BC
    Create the application pool BC
    Create website: NavWebApplicationContainer without SSL
    Update configuration: navsettings.json
    Done Configuring Web Client
    Enabling Financials User Experience
    Dismounting Tenant
    Mounting Tenant
    Mounting Database for default on server localhost\SQLEXPRESS with AllowAppDatabaseWrite = False
    Sync'ing Tenant
    Tenant is Operational
    Creating http download site
    Creating Windows user azuretfenster
    Setting SA Password and enabling SA
    Creating SUPER user
    Container IP Address: 172.26.98.103
    Container Hostname : test
    Container Dns Name : test
    Web Client : http://test/BC/?tenant=default
    Dev. Server : http://test
    Dev. ServerInstance : BC
    Dev. Server Tenant : default
    Setting test-default to 127.0.0.1 in container hosts file

Files:
http://test:8080/ALLanguage.vsix

Container Total Physical Memory is 8.5Gb
Container Free Physical Memory is 5.1Gb

Initialization took 76 seconds
Ready for connections!
Reading CustomSettings.config from test
Creating Desktop Shortcuts for test
Cleanup old dotnet core assemblies
Cleanup old dotnet core assemblies
Container test successfully created

Use:
Get-BcContainerEventLog -containerName test to retrieve a snapshot of the event log from the container
Get-BcContainerDebugInfo -containerName test to get debug information about the container
Enter-BcContainer -containerName test to open a PowerShell prompt inside the container
Remove-BcContainer -containerName test to remove the container again
docker logs test to retrieve information about URL's again

Additional information

After the container was created, do the following:

  1. Open the web client
  2. Go to any page, e.g. a Sales Quote
  3. Use the share link at the top of the page -> Copy link
Image 4. Use the resulting link, this will cause the following error Image 5. If I add `&tenant=default` to the URL, it works. But that should automatically happen for system links generated by the client

Does this happen every time?

Yes

Did this used to work?

No
Internal work item: AB#613503

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions