Error message in the Dynamics event log in Web Services for Microsoft Dynamics GP: "Exception message: The security object does not exist"


Symptoms


When you use Web Services for Microsoft Dynamics GP, the following error message may be logged in the Dynamics log: Note Depending on the system environment, the key that is mentioned in the exception message may be set to a value that is not "1." The value may be set to a value that is not "1" because the key value represents the company database ID in the SY01500 table of the DYNAMICS database.

Resolution


To resolve this problem, you must determine whether the scopes (also known as keys) that are in the DYNAMICS database are identical to the scopes in the Active Directory Application Mode (ADAM) database for Web Services for Microsoft Dynamics GP. If any scopes are missing, repair Web Services for Microsoft Dynamics GP.

Step 1: The DYNAMICS database

To determine the scopes in the DYNAMICS database, run the following query.
  • If you use SQL Server Management Studio, follow these steps:
    1. Click Start, point to All Programs, point to Microsoft SQL Server 2005 or to Microsoft SQL Server 2008, and then click SQL Server Management Studio.

    2. In the Connect to Server window, follow these steps:

      1. In the Server name box, type the name of the server that is running SQL Server.

      2. In the Authentication box, click SQL Authentication.
      3. In the Login box, type sa.
      4. In the Password box, type the password for the sa user, and then click Connect.
    3. Click the New Query button, then type the following command:
      Select INTERID as [Database Name], CMPANYID as [Scope Key] From SY01500
  • If you use Query Analyzer, follow these steps:

    1. Click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.
    2. In the Connect to SQL Server window, follow these steps:

      1. In the SQL Server box, type the name of the old server that is running SQL Server.
      2. In the Connect using area, click SQL Server Authentication.
      3. In the Login name box, type sa.
      4. In the Password box, type the password for the sa user, and then click OK .

    3. Type the following command:
      Select INTERID as [Database Name], CMPANYID as [Scope Key] From SY01500

Step 2: The ADAM database

To determine the scopes in the ADAM database, use the Authorization Manager (Azman.msc) Microsoft Management Console (MMC) snap-in to browse the database. To do this, follow these steps:
  1. Click Start, click Run, type azman.msc, and then click OK.
  2. On the Action menu, click Open Authorization Store.
  3. Click Active Directory.
  4. In Windows Explorer, open the following folder:
    C:\Program Files\Microsoft Dynamics\GPWebServices\WebServices
  5. Use Notepad to open the Web.config file.
  6. Copy the following value for the AzManConnectionString setting:
    msldap://server_name:389/CN=DynamicsSecurityService,CN=DynamicsSecurityServicePartition,DC=Microsoft,DC=COM
  7. Paste the value into the Store Name field in the Open Authorization Store window, and then click OK.
  8. Expand the DynamicsSecurityService store.
  9. Expand 25cc1a21-2cc4-4b13-a1c8-eea186fb688a to view the scopes. A folder graphic designates the scopes that are installed and that have an assigned integer value.

Step 3: Repair Web Services for Microsoft Dynamics GP

To install a scope that is missing, repair Web Services for Microsoft Dynamics GP. Use the method for your operating system:
  • Windows Server 2003

    1. Click Start, click Run, type the following command in the Open box, and then click OK:
      control appwiz.cpl
    2. Click to select Web Services for Microsoft Dynamics GP 10.0 from the application list, and then click the Change button.
    3. Click Repair, click to select Re-create exception management items and Re-load default security data, and then click Next.

      Note Any existing security settings will be lost.
    4. Type the name of the GP SQL server, select Windows Authentication or SQL Administration, and then enter the sa login ID and password. Click the Next button.
    5. Type the domain name, user name, and password of the account that is being used to run Web Services, then click Next.
    6. Click Finish.
  • Windows Server 2008

    1. Click Start, type programs and features in the Search box, and then press ENTER.
    2. Click to select Web Services for Microsoft Dynamics GP 10.0 from the application list, and then click the Change button.
    3. Click Repair, select Re-create exception management items and Re-load default security data, and then click Next.

      Note Any existing security settings will be lost.
    4. Type the name of the GP SQL server, select Windows Authentication or SQL Administration, enter the sa login ID and password, and then click Next.
    5. Type the domain name, user name, and password of the account that is being used to run Web Services, then click Next.
    6. Click Finish.

More Information


To view the Dynamics log, click Start, right-click My Computer, and then click Manage. In the navigation pane of the Computer Management dialog box, expand Event Viewer, and then click Dynamics. To view the details of an error message, click an error message in the details pane.