Configuring Business Central Web Server to Accept Host Names for Tenants
Note
Azure Active Directory is now Microsoft Entra ID. Learn more
When you deploy the Business Central Web Server in a multitenant deployment architecture, URLs that must access a specific tenant must specify the tenant ID. However, the Business Central Web client can be also accessed from URLs that specify a host name. To use host names for tenants, you must enable the corresponding URL rewrite rule in the web.config configuration file for the Business Central Web Server.
Enable the URL rewrite rule to configure the Business Central Web Server to accept host names for tenants
Setting up URL rewrite rules requires that the Microsoft URL Rewrite module is installed in IIS on the computer running the Business Central Web Server. If the module isn't installed already, download and install it from Microsoft Supported & Community Downloads for IIS.
Tip
To see whether the URL Rewrite module is installed, open Internet Information Services (IIS Manager). In the Features View, look under the IIS group for URL Rewrite. If you see it, the module's installed.
Open the web.config configuration file that is located in the physical path of the web application for the Business Central Web client.
The path is rootdrive\inetpub\wwwroot\[VirtualDirectoryName]\. For example, the folder for the default Business Central Web client application is C:\inetpub\wwwroot\BC210\.
Note
You must open the web.config file as an administrator or have permission to modify the file.
In the
<system.webServer>
</system.webServer>
element, delete the comments tags<!--
-->
before and after the<rewrite>
</rewrite>
element, if any.In the
<rule name="Hostname (without port) to tenant" enabled="false" stopProcessing="true">
element, change the value of theenabled
attribute totrue
.Save and close the web.config file.
Host names for the Business Central Web Server can now be used. If a tenant's mounted with a host name as an alternative ID, the Business Central Web Server will accept a URL that contains this host name to identify the tenant.
If you create a non-tenant specific app for SharePoint that accesses the Business Central Web Server by using Microsoft Microsoft Entra ID, the resulting URL includes a parameter that specifies a SharePoint host URL. This parameter represents the URL for opening the Business Central Web client that you've specified in the app manifest. You must enable a URL rewrite rule to accept the URL.
Related information
Multitenant Deployment Architecture
Configuring the Business Central Web Server