Saturday, June 17, 2023

Create new instance in Business Central 210 and higher version

Hello Friends,

As you know that Microsoft has removed the Administration Tool from BC21 Version of On-Prime.

Now if we need to create new Instance for BC then it can only possible using BC Admin Shell.

Below are the steps for create new service instance and configure webclient.

1. Open BC Admin Shell as Administrator















2. Run blow command to create new service instance with name "BC210DEV"

New-NAVServerInstance -ServerInstance BC210DEV -DatabaseServer ISPLBCMIGRATION -DatabaseName "w1-ls-central-release-21-5-0-0" -ClientServicesCredentialType Windows -ManagementServicesPort 7145 -ClientServicesPort 7185 -SOAPServicesPort 7147 -ODataServicesPort 7148 -DeveloperServicesPort 7149

Note: You can give the different port which not in already use.












3. Run below command to create new web client instance.

New-NAVWebServerInstance -Server ISPLBCMIGRATION -ServerInstance BC210DEV -WebServerInstance BC210DEV












Note: You can find Server Name from IIS 

















4. Change the service account and start the service.

5. You need to make change in navsetting.json file for web instance we create

Location for navsetting.json file

C:\inetpub\wwwroot\BC210DEV OR you can from IIS by Explore Folder Option































You need to verify and update value for below parameters

 - ServerInstance

 - ClientServicesCredentialType

 - ClientServicesPort

 - ManagementServicesPort









Restart IIS or Website to take effect.

Done...

You can use ServiceTierAdministrator Tool for easily update and manage BC services

Download from here - https://mibuso.com/downloads/service-tier-administration-tool







You need to change PublicWebBaseUrl key in new service to open BC auto while publish ext.

 <add key="PublicWebBaseUrl" value="http://192.168.0.118:8080/BC210DEV/Webclient/" />

Make sure that DeveloperServicesEnabled mark true

<add key="DeveloperServicesEnabled" value="true" />











Restart service to take effect.

Below is the VS Code launch.json file setting for publish extension for newly created instance

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "al",
            "request": "launch",
            "name": "BC210",
            "server": "http://192.168.0.118/",
            "serverInstance": "BC210",
            "port": 7049,
            "authentication":"Windows",
            "startupObjectId": 22,
            "startupObjectType": "Page",
            "breakOnError": true,
            "launchBrowser": true,
            "enableLongRunningSqlStatements": true,
            "enableSqlInformationDebugger": true            
        },
        {
            "type": "al",
            "request": "launch",
            "name": "BC210DEV",
            "server": "http://192.168.0.118/",
            "serverInstance": "BC210DEV",
            "port": 7149,
            "authentication":"Windows",
            "startupObjectId": 22,
            "startupObjectType": "Page",
            "breakOnError": true,
            "launchBrowser": true,
            "enableLongRunningSqlStatements": true,
            "enableSqlInformationDebugger": true            
        }
    ]
}

Note: You can refer second configuration of BC210DEV

Now all setup done!!!

You can able to run web client from link - http://192.168.0.118:8080/BC210DEV/

You can also direct publish or debug the extension in new web instance.












Thank you for reading.

I hope this will help someone.

Keep Sharing....Keep Growing....

2 comments:

  1. this is really useful information. thank you Sir.

    ReplyDelete
  2. http://nav.ategroup.com/ZetadocsArchive/view/9fb2f52e-98cf-4b1d-9dbf-36e98766b66b/BFC LOGISTICS-Invoice-682-Indent-34890.pdf

    ReplyDelete