Installing the service components
On the server where you installed Web Services for Microsoft Dynamics GP, add the document type assemblies, metadata helper applications, service assembly, and XSLT files for your service. To install a new service, complete the following steps:
Install the document type assembly.
When you build the project, Visual Studio places the assembly in the "\bin\debug" or "\bin\retail" folder of the Visual Studio project folder. Copy the assembly to the Dynamics GP "GPWebServices" folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices
Add your security metadata.
When you build the project, Visual Studio places the application and application configuration files in the "\bin\debug" or "\bin\retail" folder of the Visual Studio project folder. Copy your "security helper" application and application configuration files to the Dynamics GP "GPWebServices" folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices
To add your custom security operations, tasks, and role assignments in the Dynamics Security Service, use your "security helper" application. To run the InstallLeadSecurityMetadata application, you must be logged in as a user that has permission to update the Dynamics Security Service.
The permissions required for this login depend upon the security store you selected when you installed Web Services for Microsoft Dynamics GP. You must use a login that has permission to update your specified security store.
Security store
Description
Active Directory
Application Mode (ADAM)
Log in as user who is an ADAM administrator. If you run the InstallLeadSecurityMetadata application using a login that is not an ADAM administrator, ADAM returns a "System.UnauthorizedAccessException" error. By default, the user who installed Web Services for Microsoft Dynamics GP is an ADAM administrator. To add another user as an ADAM administrator, see the Web Services Installation and Administration Guide.
Active Directory
Log in as a user with permission to open and manage the Active Directory authorization store. Specify the login you use when you open the Authorization Manager console window to view and update application permissions in your Active Directory authorization store.
SQL
Log in as a user with SQL administrator permissions for the database you use to store Dynamics Security Service metadata. The login must have permission to create records in the underlying security tables.
To add your security operations, tasks, and role assignments to the Dynamics Security Service, run your "security helper" application with the "/load" command line parameter. If you are using a multitenant environment, be sure to include the tenant name as the second parameter. You must run this process for each tenant on which you want to use your web service.
To add your new security tasks and operations to additional Dynamics Security Service roles, use the Dynamics Security Console.
Add your policy metadata.
When you build the project, Visual Studio places the application and application configuration files in the "\bin\debug" or "\bin\retail" folder of the Visual Studio project folder. Copy your "policy helper" application and application configuration files to the Dynamics GP "GPWebServices" folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices
To add your custom policies and behaviors to the Dynamics GP services, run your "policy helper" application. Run the application with the "/load" and the company Id number as command line parameters. If you are using a multitenant environment, be sure to include the tenant name as the third parameter. You must run this process for each tenant on which you want to use your web service.
Hint: To find the company Id of each installed company, query the SY01500 table of the DYNAMICS (system) database.
Install the policy resource assembly.
When you build the project, Visual Studio places the assembly in the "\bin\debug" or "\bin\retail" folder of the Visual Studio project folder. Copy the policy resource assembly to the Dynamics GP "GPWebServices" folder folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices
Check the security permissions for the policy resource assembly.
Verify that the policy resource assembly grants Read permission to the user account that is used as the login identity of the Microsoft Dynamics GP Service Host service.
To check security permissions, open the file properties window and click the Security tab. Verify the groups, users, and permissions specified for the policy resource assembly are the same as those specified for the following assembly:
Microsoft.Dynamics.GP.DataAccess
Install the service assembly.
When Visual Studio created your service project, it placed the assembly file in the "\bin\debug" or "\bin\retail" folder of your Visual Studio project folder. Copy the service your service assembly file to the Dynamics GP "GPWebServices" folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices
Install the service assembly configuration file.
Copy the configuration file for your service to the Dynamics GP "ServiceConfigs" folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices\ServiceConfigs
Add the service to the service host configuration file.
To enable a service client to connect to your service, your service must be hosted by the Microsoft.Dynamics.GP.ServiceHost.exe service. To add a service to that host, add information about your service to the Microsoft.Dynamics.GP.WebServices.ServiceHost.exe.config file. The configuration file is typically found in this location:
C:\Program Files\Microsoft Dynamics\GPWebServices
Hint: To ensure you can restore the Dynamics GP Service to its original functionality, create a copy of the Microsoft.Dynamics.GP.WebServices.ServiceHost.exe.config file. Save the copy to a safe location.
Open the Microsoft.Dynamics.GP.WebServices.ServiceHost.config file in a text editor. Add a <service> node to <services>. If your service uses both the native and legacy endpoints, add a <service> entry for each endpoint. The <service> node in the configuration file requires the following information about your service:
Attribute
Description
name
Specify the name of your service.
serviceType
Specify information that identifies your service. You must nclude the following information:
The namespace and class name from your service.
The name of the assembly for your service.
The version number of your service assembly.
The culture setting for your service assembly.
ConfigurationFileLocation
Specify the location and name of the configuration file for your service.
Install the XSLT files.
Copy your XSLT files to the Dynamics GP service "XSLT" folder, typically found in the following location:
C:\Program Files\Microsoft Dynamics\GPWebServices\XSLT
Restart the Microsoft Dynamics GP Service Host.
To ensure the Dynamics GP Service loads and hosts your service, restart the Microsoft Dynamics GP Service Host. To retart the host service, open the Services console, click the service name Microsoft Dynamics GP Service Host and then stop and restart the service.