Compartir a través de


How to: Set Up Multiple Web Server Instances for the Microsoft Dynamics NAV Web Client

When you install the Microsoft Dynamics NAV Web Server components, a website with a web server instance for the Microsoft Dynamics NAV Web client is added on Internet Information Services (IIS). There may be scenarios when you want to set up multiple Microsoft Dynamics NAV Web client instances on the Microsoft Dynamics NAV Web client website. For example, you could set up a separate Microsoft Dynamics NAV Web client instance for the different companies.

To add a new Microsoft Dynamics NAV Web client application, you use the Microsoft Dynamics NAV Administration Shell and run the New-NAVWebServerInstance cmdlet to add a new web server instance. The resultant Microsoft Dynamics NAV web server has the following characteristics:

  • A virtual directory instance with an underlying web application is added to the Microsoft Dynamics NAV Web client website. The Microsoft Dynamics NAV Web client application has its own web.config file that you can modify to change the configuration of the Microsoft Dynamics NAV Web client.

  • You can configure IIS settings, such as application pool. You can also configure Microsoft Dynamics NAV settings, such as the Microsoft Dynamics NAV Server instance or company. These setting must be configured separately for each web server instance.

  • The new web server instance has the same URL as other instances under the parent website, except that it includes the instance name that you specify with the New-NavWebServerInstance cmdlet.

    For example, the URL for the default Microsoft Dynamics NAV Web client is http://MyNavWebServer:8080/DynamicsNAV71/WebClient. The URL for the new Microsoft Dynamics NAV Web client instance, which you name MyCompany, would be http://MyNavWebServer:8080/MyCompany/WebClient.

You can run the cmdlet multiple times to create additional Microsoft Dynamics NAV web server instances on the server.

Note

You cannot nest applications. Only one level of applications under a website is allowed.

For more information about Microsoft Dynamics NAV web server instances on IIS, see Deploying the Microsoft Dynamics NAV Web Client.

To add a web server instance

  1. (Optional) Modify the instanceweb.config file.

    For more information, see Modifying the Microsoft Dynamics NAV Settings in the Instanceweb.config File

    Note

    You would typically follow this step if you were adding multiple Microsoft Dynamics NAV Web client instances to save time configuring each instance.

  2. On the computer that is running IIS, run Microsoft Dynamics NAV Administration Shell as an Administrator.

    On the Start menu, right-click Microsoft Dynamics NAV Administration Shell, and then choose Run as Administrator.

  3. At the command prompt, type the following command.

    New-NAVWebServerInstance -WebServerInstance MyWebApp -Server NAVServer -ServerInstance NAVServerInstance
    
    • Change MyWebApp to the name that you want to give the virtual directory for the web server instance. This name will become part of the URL for the Microsoft Dynamics NAV Web client application, for example, http://MyWebServer:8080/MyWebApp/WebClient.

    • Change NAVServer to the name of the computer that is running the Microsoft Dynamics NAV Server to which you want to connect.

    • Change NAVServerInstance to the name of the instance on the Microsoft Dynamics NAV Server.

    Note

    This command only sets the required parameters of the NAVWebServerInstance cmdlet. The cmdlet has several other parameters that can use to configure the web server instance. For more information about the syntax and parameters, see New-NAVWebServerInstance.

  4. Press Enter to run the cmdlet.

    A new web server instance is added.

    Note

    If you want to change the configuration of the new Microsoft Dynamics NAV web server instance, modify the web.config file. For more information, see Configuring Microsoft Dynamics NAV Web Client by Modifying the Web.config File.

Modifying the Microsoft Dynamics NAV Settings in the Instanceweb.config File

The Microsoft Dynamics NAV web server instances that you add with the New-NavWebServerInstance cmdlet use the instanceweb.config file as a template file to create the actual web.config file for the instance. Modifying the instanceweb.config file enables you to configure the Microsoft Dynamics NAV settings in advance, and then pass the settings to new web server instances when they are created.

By default, the instanceweb.config file is located in the C:\Program Files\Microsoft Dynamics NAV\71\Web Client folder of the computer on which Microsoft Dynamics NAV Web Server components are installed.

To modify the Microsoft Dynamics NAV settings in the instanceweb.config file

  1. On the computer that you installed the Microsoft Dynamics NAV Web Server components, open the instanceweb.config file in a text editor, such as Notepad.

  2. Locate the <DynamicsNAVSettings> element.

  3. Change the parameter values as needed.

    For more information, see Configuring Microsoft Dynamics NAV Web Client by Modifying the Web.config File.

  4. Save the web.config file.

See Also

Tasks

How to: Install the Web Server Components for the Microsoft Dynamics NAV Web Client

Concepts

Deploying the Microsoft Dynamics NAV Web Client
Configuring Microsoft Dynamics NAV Web Client by Modifying the Web.config File