When you install Microsoft Dynamics NAV Portal Framework on a SharePoint application, Microsoft Dynamics NAV Portal Framework is also deployed on any subsites of the application. By default, the subsites use the same Microsoft Dynamics NAV settings as root site, such as the Microsoft Dynamics NAV Server, company, and language. These settings are specified in the <DynamicsNAVSettings> element in the web.config file of the root application.

There may be instances when you want subsites to use different Microsoft Dynamics NAV settings than the root site. For example, you can have the subsites use a different Microsoft Dynamics NAV company or language. The following table lists the Microsoft Dynamics NAV settings that you can configure for a subsite:

Setting Description

Company

Sets the company in Microsoft Dynamics NAV to connect to.

Language

Sets the language version of Microsoft Dynamics NAV objects to display on Microsoft SharePoint sites of a web application.

HelpURL

Specifies the URL that is targeted by the Microsoft Dynamics NAV Help action that is available on Microsoft Dynamics NAV pages in the Microsoft Dynamics NAV SharePoint client.

ClientServicesPort

Specifies the TCP port for the Microsoft Dynamics NAV Server. This is part of the Microsoft Dynamics NAV Server’s URL.

Server

Specifies the name of the computer that is running the Microsoft Dynamics NAV Server.

ServerInstance

Specifies the name of the Microsoft Dynamics NAV Server instance that the Microsoft Dynamics NAV Portal Framework connects to.

You change the Microsoft Dynamics NAV settings individually for each subsite by adding a <location> element to the web.config.

To modify the web.config file to change the Microsoft Dynamics NAV settings of subsites

  1. Open the web.config for editing in a text editor, such as Notepad.

    By default, the web.config file is located on the computer that is running Microsoft SharePoint Server in the c:\inetpub\wwwroot\wss\VirtualDirectories\portnumber folder. The portnumber indicates the port that is assigned to the web application.

  2. Add the following elements to the <configuration> element of the web.config file.

      Copy Code
    <location path="siteURLname">
      <DynamicsNAVSettings>
      </DynamicsNAVSettings>
    </location>
    

    Replace siteURLname with the URL name of the subsite.

    Note
    You can add the elements anywhere in the file as long as they are only enclosed by the <configuration> element.
  3. For each Microsoft Dynamics NAV setting that you want to change, include the following element in the <DynamicsNAVSettings> element.

      Copy Code
    <add key="parameter" value="value" />
    

    Replace parameter with the parameter name. Replace value with a valid setting.

    For a detailed description of the parameters, see Configuring Microsoft Dynamics NAV Portal Framework.

  4. Save the web.config file.

Example

The following code is a part of a web.config file that illustrates how to specify a different company and language for two subsites. The URL of the parent site is http://MySharePointSite:7000. The URL of the subsites are http://MySharePointSite:7000/site1 and http://MySharePointSite:5000/site2.

  Copy Code
<configuration>
  <!-- additional elements -->
  
  <DynamicsNAVSettings>
	<!-- root NAV settings -->
  </DynamicsNAVSettings>
  <location path="site1">
	<DynamicsNAVSettings>
	<add key="Company" value="Company1"/>
	<add key="language" value="fr-FR"/>
	</DynamicsNAVSettings>
  </location>
  <location path="site2">
	<DynamicsNAVSettings>
	<add key="Company" value="Company2"/>
	<add key="language" value="da-DK"/>
	</DynamicsNAVSettings>
  </location>
  <!-- additional elements -->
</configuration>