MS Dynamics NAV – Setting up an Application Server (NAS)
In MS dynamics NAV, there are lots of discussions about NAS and its behavior & functionality and also about installing NAV correctly. Lets’ first see what is meant by NAS?
What is NAS?
Navision Application Server is a middle-tier server that runs as a service. It is designed to provide access from external clients to the MS Dynamics NAV Navision database. The database could be either MS SQL Server or Native Navision Database Server. Whatever database platform it runs, NAS acts as a bridge to the NAV database when it is integrated other external applications. In this case, external applications mean any other applications apart from the typical Navision client.
The key role of the application server is in the e-business solutions. For example, Navision Application Server provides connectivity between a Web client (such as Navision Employee Portal) and Navision Database Server; between an external application (such as Microsoft Business Solutions–Axapta) or a Navision client and the database; and between third-party devices (such as Automatic Data Capture System) and Navision. The application server can also serve the Navision client itself, with automated posting and printing.
How to install NAS
First we see the authentications structure of the NAS. Simply NAS needs a windows login into the Database. In other words, the existing database login accounts already created in the database have nothing to do with a NAS. Therefore, if you are managing with the database authentication at the moment, the first task you should do is creating a windows login to the database. This is because it is service and inability to assign a database login in a service. The service needs a windows login to launch it. Therefore you will be required to create a login in the domain or in the server to accomplish this task.
Once you create a windows login, you will have to grant the rights for this new account. So, you need to create that Windows login in the SQL server and assign him the sysadmin role.
Now you can login to the SQL server with the new windows accounts, but still this is not enough for login to the NAV. Therefore, you have create a Windows Login Account in NAV. When doing this, you have to assign SUPER role for this windows account.
Now it is time for you to install NAS. To do this, take the NAV installation CD and launch the ..\NAS\setup.exe file. You may just accept all the default values given in the installation process, however make sure to remember the installation path of the NAS directory as you would need it when configuring the NAS in the next step.
In general, it would more advisable to manually create required NAS instances. You should not use the default two instances created by the installation which are namely, Microsoft Dynamics NAV application Server-[machine name]-SQL & Microsoft Dynamics NAV application Server-[machine name]-Classic. Therefore, the next important step what you should is disabling the above mentioned services from the pc as they would unnecessarily consume the system memory. In the next phase you setup your own NAS instances as follows;
Please note that this will be manual process and you will do this using the command prompt. In other words, you have to use command line instructions for install/start and uninstall/stop of the NAS. My experience is that it always to easy to copy and maintain the following commands in a proper place and make use them whenever I am in need of changing any of the given parameters.
There are the steps for creating a NAS;
1. Go to the sub directory of the NAS installations
2. Paste the following in the command prompt in the NAS sub directory.
nassql.exe appservername=TheNasName, NETTYPE=TCP, servername=TheSQLServer, database=TheSQLDatabase, company="The Company", nettype=tcp, startupparameter=”THEPARAMETER”, objectcache=40000, installasservice
The above will create a new service as TheNasName. To start the service, you may give the following in the command prompt.
Net start TheNASName
In case you want to stop the service, you provide the below in the command prompt.
Net stop TheNASNAME
In case you want to uninstall it
Nassql.exe appservername =TheNASName, uninstallasservice
Suppose if want to setup a Navision Application Server, but still you are running Navision Native Database you could do it by providing the below instructions on the command prompt
nas.exe appservername=TheNasName, NETTYPE=TCP, servername=TheNAVServer, company="The Company", nettype=tcp, startupparameter=”THEPARAMETER”, objectcache=40000, installasservice
In case you want to stop the service which is created on top of the Navision Database Server, you provide the below in the command prompt.
Net stop TheNASNAME
In case you want to uninstall the NAS which is created on top of the Navision Database Server, you may provide the below instructions on the command prompt
Nassql.exe appservername =TheNASName, uninstallasservice
Now I am giving you the meaning each parameter defined in above mentioned processors.
1. Appservername: This would be the name of the Navision Application Server you would define. Please note that this name is only used as reference in your windows operating system and this name has nothing to do with Navision. Please also make sure to avoid any spaces or special characters for this name.
2. Server name: This would be the name of the SQL Server or Navision database server.
3. Database: this is only used in SQL Server and it is the name of the database for which you are trying to create a NAS.
4. Startupparameter: This is the unique name used by Navision for it’s all references. The value which you defined for the parameter will be used by Navision inside the C/AL. The value you define here will be used in the NASHandler trigger of the Application Management Code unit (code Unit No 1). For example, if your purpose is to define a NAS for Navision Employee Portal, you must define the start up parameter as NEP_1, NEP2 etc. If you purpose is to setup the NAS for Commerce Gateway/BizTalk Server Integration in NAV then you must define the startup parameter as CG. However, please note that only alpha numeric characters should be given for defining the startup parameters.
Now it is time to run and see the Navision Application Server. So you may go the windows services area. You could also do this by typing “run service.msc”. Now do the followings;
1. Locate the newly created service which is TheNasName
2. Open the service
3. Define the start up type as Automatic
4. Go to the Log On tab
5. Provide the Windows user Account and the password you defined at the beginning.
This should successfully create the Navision Application Server. However, you can further check the NAS whether it is working fine by locating the Windows event viewer. You could open the Event Viewer by typing eventvwr.msc
In MS dynamics NAV, there are lots of discussions about NAS and its behavior & functionality and also about installing NAV correctly. Lets’ first see what is meant by NAS?
What is NAS?
Navision Application Server is a middle-tier server that runs as a service. It is designed to provide access from external clients to the MS Dynamics NAV Navision database. The database could be either MS SQL Server or Native Navision Database Server. Whatever database platform it runs, NAS acts as a bridge to the NAV database when it is integrated other external applications. In this case, external applications mean any other applications apart from the typical Navision client.
The key role of the application server is in the e-business solutions. For example, Navision Application Server provides connectivity between a Web client (such as Navision Employee Portal) and Navision Database Server; between an external application (such as Microsoft Business Solutions–Axapta) or a Navision client and the database; and between third-party devices (such as Automatic Data Capture System) and Navision. The application server can also serve the Navision client itself, with automated posting and printing.
How to install NAS
First we see the authentications structure of the NAS. Simply NAS needs a windows login into the Database. In other words, the existing database login accounts already created in the database have nothing to do with a NAS. Therefore, if you are managing with the database authentication at the moment, the first task you should do is creating a windows login to the database. This is because it is service and inability to assign a database login in a service. The service needs a windows login to launch it. Therefore you will be required to create a login in the domain or in the server to accomplish this task.
Once you create a windows login, you will have to grant the rights for this new account. So, you need to create that Windows login in the SQL server and assign him the sysadmin role.
Now you can login to the SQL server with the new windows accounts, but still this is not enough for login to the NAV. Therefore, you have create a Windows Login Account in NAV. When doing this, you have to assign SUPER role for this windows account.
Now it is time for you to install NAS. To do this, take the NAV installation CD and launch the ..\NAS\setup.exe file. You may just accept all the default values given in the installation process, however make sure to remember the installation path of the NAS directory as you would need it when configuring the NAS in the next step.
In general, it would more advisable to manually create required NAS instances. You should not use the default two instances created by the installation which are namely, Microsoft Dynamics NAV application Server-[machine name]-SQL & Microsoft Dynamics NAV application Server-[machine name]-Classic. Therefore, the next important step what you should is disabling the above mentioned services from the pc as they would unnecessarily consume the system memory. In the next phase you setup your own NAS instances as follows;
Please note that this will be manual process and you will do this using the command prompt. In other words, you have to use command line instructions for install/start and uninstall/stop of the NAS. My experience is that it always to easy to copy and maintain the following commands in a proper place and make use them whenever I am in need of changing any of the given parameters.
There are the steps for creating a NAS;
1. Go to the sub directory of the NAS installations
2. Paste the following in the command prompt in the NAS sub directory.
nassql.exe appservername=TheNasName, NETTYPE=TCP, servername=TheSQLServer, database=TheSQLDatabase, company="The Company", nettype=tcp, startupparameter=”THEPARAMETER”, objectcache=40000, installasservice
The above will create a new service as TheNasName. To start the service, you may give the following in the command prompt.
Net start TheNASName
In case you want to stop the service, you provide the below in the command prompt.
Net stop TheNASNAME
In case you want to uninstall it
Nassql.exe appservername =TheNASName, uninstallasservice
Suppose if want to setup a Navision Application Server, but still you are running Navision Native Database you could do it by providing the below instructions on the command prompt
nas.exe appservername=TheNasName, NETTYPE=TCP, servername=TheNAVServer, company="The Company", nettype=tcp, startupparameter=”THEPARAMETER”, objectcache=40000, installasservice
In case you want to stop the service which is created on top of the Navision Database Server, you provide the below in the command prompt.
Net stop TheNASNAME
In case you want to uninstall the NAS which is created on top of the Navision Database Server, you may provide the below instructions on the command prompt
Nassql.exe appservername =TheNASName, uninstallasservice
Now I am giving you the meaning each parameter defined in above mentioned processors.
1. Appservername: This would be the name of the Navision Application Server you would define. Please note that this name is only used as reference in your windows operating system and this name has nothing to do with Navision. Please also make sure to avoid any spaces or special characters for this name.
2. Server name: This would be the name of the SQL Server or Navision database server.
3. Database: this is only used in SQL Server and it is the name of the database for which you are trying to create a NAS.
4. Startupparameter: This is the unique name used by Navision for it’s all references. The value which you defined for the parameter will be used by Navision inside the C/AL. The value you define here will be used in the NASHandler trigger of the Application Management Code unit (code Unit No 1). For example, if your purpose is to define a NAS for Navision Employee Portal, you must define the start up parameter as NEP_1, NEP2 etc. If you purpose is to setup the NAS for Commerce Gateway/BizTalk Server Integration in NAV then you must define the startup parameter as CG. However, please note that only alpha numeric characters should be given for defining the startup parameters.
Now it is time to run and see the Navision Application Server. So you may go the windows services area. You could also do this by typing “run service.msc”. Now do the followings;
1. Locate the newly created service which is TheNasName
2. Open the service
3. Define the start up type as Automatic
4. Go to the Log On tab
5. Provide the Windows user Account and the password you defined at the beginning.
This should successfully create the Navision Application Server. However, you can further check the NAS whether it is working fine by locating the Windows event viewer. You could open the Event Viewer by typing eventvwr.msc
Comments
Post a Comment