How to enable multiple web server instances in Dynamics 365 Business Central

Hi,

in this blog post, I will write how you can install multiple web instances for Dynamics 365 Business Central On-Prem. The reason why I needed this was to allow clients to have multiple installations of Dynamics 365 Business Central on the same server.

After I installed my W1 Dynamics 365 Business Central I got one web server instance BC150 and one server instance BC150 which was for my W1. Now, when I tried to install my Italian version I got the screen that I need to uninstall, repair or add/remove components.

This was not the solution for my case, so I was wondering what is the workaround.

First, what I did was, created a new server instance called BC150IT, restored the Italian database and attached this new database to my new server instance.

After that, I copied my language files from Italian installation for Dynamics 365 Business Central On-Prem to my folder where Service is created. By default it is inside C:\Program Files\Microsoft Dynamics 365 Business Central\150\Service\.

Also, because I want to have an option inside my client to choose Italian language I put folders it-IT and it and files inside C:\Program Files (x86)\Microsoft Dynamics 365 Business Central\150\RoleTailored Client\

Now, what I need to create is a new webserver instance to have a possibility to open both W1 and IT versions of Dynamics 365 Business Central at the same time.

Here, I have two options:

  • share the same port, but different instance name
  • use a different port, which will allow me to use a different certificate

If I choose the first option then I need a small PowerShell line of code to create a new webserver instance inside my Dynamics 365 Business Central.

For the first case I used this line:

New-NAVWebServerInstance -WebServerInstance BC150IT -Server localhost -ServerInstance BC150IT -SiteDeploymentType Subsite -ContainerSiteName "Microsoft Dynamics 365 Business Central Web Client" -WebSitePort 8080 -PublishFolder "C:\WebPublish"

Because I typed -ContainerSiteName, PowerShell will automatically put my new instance BC150IT inside my Microsoft Dynamics 365 Business Central Web Client container, and you can find that inside IIS.

Also, you can see that my last parameter is -PublishFolder inside my C:\. This folder WebPublish contains all the necessary data for Dynamics 365 Business Central web server instance. You can find this folder inside C:\Program Files\Microsoft Dynamics 365 Business Central\150\Web Client.

Now, when my webserver instance is created what I also did is that I copied all files except navsettings.json from my BC150 folder file to my new BC150IT folder inside C:\inetpub\wwwroot.

I restarted my webservZGer and I navigated to my localhost:8080/BC150, and in another browser to localhost:8080/BC150IT and I got my Dynamics 365 Business Central in both W1 and IT languages. If you don’t see IT language then just copy folders from the Italian version of Dynamics 365 Business Central to the C:\inetpub\wwwroot\NEWWEBSERVERINSTANCE\

If you choose the second option to create new webserver outside of existing container you can do it by using another PowerShell line of code

New-NAVWebServerInstance -WebServerInstance BC150IT2 -Server localhost -ServerInstance BC150IT -SiteDeploymentType RootSite -WebSitePort 8081 -PublishFolder "C:\WebPublish"

Here, everything will be the same except -SiteDeploymentType will be RootSite, and you need to specify -WebSitePort, and you don’t need to specify -ContainerSiteName. Configured like this, you will get new site inside Sites folder in IIS.

When my new webserver instance BC150IT2 was created, I also copied files from my BC150 web server instance to the new folder BC150IT2 inside C:\inetpub\wwwroot.

Now, when I am accessing my webserver BC150IT2 I don’t need to specify an instance name, I can easily just type computername:port and Dynamics 365 Business Central will open.

I hope this will help you, and save you the time when you will have the same problem as me.

Best regards,

Renato 🙂

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

Copyright ©2020 fajdiga.info. All rights reserved. Powered by Derecjun

Log in with your credentials

Forgot your details?