CREAZIONE NAV SERVER E NAV WEB SERVICES AGGIUNTIVI
Due dritte per la creazione dei nav server e dei web services aggiuntivi, ripresi da MSDN
1> In Control Panel, click Administrative Tools, and then click Services to open the Services snap-in.
2> In the list of services, right-click Microsoft Dynamics NAV Server, and then click Stop.
3> Navigate to the Microsoft Dynamics NAV Service directory. This directory is typically located at C:\Program Files\Microsoft Dynamics NAV\60\.
4> Copy the service directory and paste it into the same directory. Rename the copy from Copy of Service to Service2.
5> At the command prompt,
type the sc command to create a new service.
Copy the following command and paste it at the command prompt.
Replace <computername> with the actual computer name.
Copy
> sc \\<computername> create MicrosoftDynamicsNAVServer$NAV2 binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Server Instance 2" start= auto type= own depend= NetTcpPortSharing
es: comando da lanciare:
> sc \\NAV-SRV create MicrosoftDynamicsNAVServer$NAV2 binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Server Instance 2" start= auto type= own
(depend= NetTcpPortSharing, oppure omettere se serve utilizzare una porta aggiuntiva)
se da errore eseguire localmente con
> sc create MicrosoftDynamicsNAVServer$NAV2 binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Server Instance 2" start= auto type= own
6> If the command succeeds, then you receive the following message:
[SC] CreateService SUCCESS
In the Services snap-in, you see your second service, Microsoft Dynamics NAV Server Instance 2, in the list.
7> Double-click the new service to open a Properties dialog box for the new service, and then click the Log On tab.
The default setting is for the service to log on with the Local System Account. Setup configures the original Microsoft Dynamics NAV Server service to use the Network Service account. This walkthrough also uses the Network Service account for the second service. For improved security, you should use a dedicated domain user account. For information on how to configure a Microsoft Dynamics NAV Server service to use a domain user account, see Walkthrough: Installing the Three Tiers on Three Computers.
8> Click This account on the Log On tab.
9> Type NT Authority\NetworkService (or DOMAIN\SERVICE) in the first text box.
10> Clear the entries in the Password and Confirm password fields.
11> Click OK to exit the Properties dialog box for the new service.
12> Right-click Microsoft Dynamics NAV Server Instance 2, and then click Start to verify that the service is configured correctly.
13> Right-click Microsoft Dynamics NAV Server Instance 2 again, and then click Stop.
TEST SECOND NAV SERVER SERVICE
To connect the RoleTailored client to a second service.
1> Open the RoleTailored client that you have installed on a separate computer.
2> In the Role Center menu bar, click Microsoft Dynamics NAV, and then click Select Server.
3> In Server Name, add the number 2 to the DynamicsNAV value so that it is DynamicsNAV2.
4> Click Connect.
5> Select CRONUS International Ltd. from the Companies list.
Unless you have already installed additional databases, the demo database is the only one available and is automatically selected.
Click Connect, and then start working with your database.
sc \\NAV-SRV create MicrosoftDynamicsNAVWS$NAV2 binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Business Web Services2" start= auto type= own
CREATE SECOND NAV WEB SERVICE
Creating a Second Web Services Server on a Single Computer
Then create the service for Web Services:
-> SC \\NAS-SRV CREATE "MicrosoftDynamicsNAVWS$Srv2" binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $Svr2" DisplayName= "MSWSSvr2" type= share
Sempre obbligo TYPE = SHARE, non è possibile eseguire binding HTTP (solo il primo servizio è bindato su HTTP)
Esempio
SC \\NAS-SRV CREATE "MicrosoftDynamicsNAVWS$NAV2" binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Business Web Services2" type= share
es: se da errore da remote con \\NAS-SRV
provare localmente
SC CREATE "MicrosoftDynamicsNAVWS$NAV2" binpath= "C:\Program Files\Microsoft Dynamics NAV\60\Service2\Microsoft.Dynamics.Nav.Server.exe $NAV2" DisplayName= "Microsoft Dynamics NAV Business Web Services2" type= share
CONFIGURARE LE PORTE
(SCENARIO CON PORTE NON IN SHARING)
es:
> standard port 7046, 7047
> porte aggiuntive 7050, 7051
TEST AMBIENTI
es:
RTC, Web
http://srvnav:7046/DynamicsNAV/
http://srvnav:7047/DynamicsNAV/WS/COMPANY/Codeunit/WebOrderM
Secondo RTC, Web
http://srvnav:7050/DynamicsNAV/
http://srvnav:7051/DynamicsNAV2/WS/COMPANY/Codeunit/WebOrderM
TEST DELEGHE
> verificare se necessario creare SPN per autenticazione (dovrebbe già funzionare in quanto SQL è bindato dall'installazione
a 3 livelli precedenti.
fonte principale
riadattato da RS
MSDN, "Walkthrough: Accessing Multiple Microsoft Dynamics NAV Databases from a Single Microsoft Dynamics NAV Server Computer"
http://msdn.microsoft.com/en-us/library/dd301437.aspx