You cannot access a PDS extension from Project Server 2003 (867742)



The information in this article applies to:

  • Microsoft Office Project Server 2003

Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SYMPTOMS

You cannot access a custom Project Data Service (PDS) extension from Microsoft Office Project Server 2003. However, calls to the standard published Project Server PDS file name extensions work as expected.

CAUSE

This problem occurs when the PDS extension does not meet the following guidelines:
  • The PDS extension does not resend the correct XMLRequest method.
  • The PDS extension is registered as COM objects.
  • The PDS extension is registered with the Project Server PDS extensions.

RESOLUTION

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements. To resolve this problem, follow these steps:
  1. The PDS extension can call a PDS Extender when the extender implements a public function named XMLRequest that has one of the following code signatures, depending on the program that you are running:
    1. The following code signature is for Microsoft Visual Basic 6:
      Public Function XMLRequest( _
          ByVal sXML As String, _
          ByVal sUser As String, _
          ByVal sConnect As String, _
          ByVal lDBType As Long, _
          ByRef nHandled As Integer) _
          As String
      
    2. The following code signature is for Microsoft .NET:
      [ComVisible(true)]
      	public string XMLRequest(_
      string Xml, _
      string User, _
      string Connect, _
      int DatabaseType, _
      ref short Handled)
      
    3. The following code signature is for .NET (XMLRequestEx variant ):
        [ComVisible(true)]
            public string XMLRequestEx(string sXML, string sPDSInfoEx, 
                                       ref short nHandled)
      
  2. Register the PDS as a COM object. To do this, follow these steps:
    1. Set the class with the required attributes for COM interoperability.
    2. Generate a new GUID by using the Uuidgen.exe program for each new class.

      The following is an example of how to use the Uuidgen.exe program for each new class to generate a new GUID:

      [Guid("EAA49654-65E3-4BC5-BCC7-E465264323D5"),
      ComVisible(true),
      ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
    3. Add the XMLRequestEX() method by using the required parameter layout.
    4. Add the method calls that validate the request and provide error handling.
  3. Register the PDS COM object with Project Server 2003. To do this, follow these steps.

    Note To work as expected, a .NET PDS extension must the following requirements:
    • Have the correct XmlRequestEx() or XmlRequestEx() signature.
    • Have the correct class and method level attributes for COM Interop. The GUID must be unique for each extension class. The assembly must be strongly named but does not have to be put in the global assembly cache (GAC). However, you can put the assembly in the GAC. To do this, follow these steps:
      1. On the Project Server 2003 computer, click Start, click Run, type assembly in the Open box, and then click OK.

        Note The C:\Windows\assembly folder will open.
      2. Click Start, click Accessories, and then click Windows Explorer.
      3. Locate your assembly.dll file, right-click the assembly.dll file, and then click Copy.
      4. In the C:\Windows\assembly window, right-click, and then click Paste.

        Note You will see the Global Assembly Name, the Version, the Public Key Token, and other values of the assembly that were specified.
  4. To install a .NET PDS extension, follow these steps:
    1. Click Start, click Run, type iisreset /STOP in the Open box, and then click OK.
    2. Copy the .dll extension module file to a binary folder.

      Note We recommended that %PROGRAM%BIN be used as the binary folder. The placeholder %PROGRAM% is the Project Server folder. Typically, the C:\Program Files\Microsoft Office Project Server 2003\ folder is the %PROGRAM% Project Server folder.
    3. Repeat step b for any additional assemblies.
    4. Click Start, click Run, type command in the Open box, and then click OK.
    5. Type RegAsm "%PROGRAM%BIN\PdsExtension.dll" /codebase, and then press the ENTER key.

      Note RegAsm adds information about the class to the system registry so that COM clients can use the .NET class transparently. The /codebase option creates a Codebase entry in the registry. This specifies the file path for an assembly that is not installed in the global assembly cache. This is the reason why the assembly must be strongly named. Repeat step e for any other assemblies that contain classes that are going to be registered as PDS extensions.
    6. Run the PdsRegister tool. This creates the required registry entry to register the PDS extension with the Project Server PDS. To do this, use the following syntax:
      PdsRegister Microsoft.ProjectServer.Extension.General

      Note The PdsRegister tool is available for download. To download the PdsRegister tool, visit the following Microsoft Web site:

      Note Installation of the PdsRegister tool may involve other scripts such as creating SQL Server tables, views, and stored procedures. We recommend that all installation steps are scripted.

      Additionally, the PdsRegister tool just automates the process that is listed in the "How to manually register the PDS extender" section.

      Visual Basic 6 will register a PDS extension automatically during compile. For more information, visit the following Microsoft Web site:

How to manually register the PDS extender

If you must register the PDS extender as a COM object manually, use follow these steps.

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.
  1. Click Start, click Run, type command in the Open box, and then click OK.
  2. Locate and then change your path of the folder that contains the ProjectManager.dll file.
  3. Type REGSVR32 ProjectManager.dll, and then press the ENTER key.

    Note This command registers the component with a ProgID of ProjectManager.Class1.
  4. To register the PDS extender with Project Server 2003, you must modify the registry.
  5. Click Start, click Run, type regedit in the Open box, and then click OK.
  6. Locate and then right-click the following registry key:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\11.0\MS Project\WebClient Server\ProjectServer

  7. Point to New, and then click String Value.
  8. Type PDSExtension#, and then press the ENTER key.

    Note Where # is a number that is not already being used. An example is PDSExtension1. The number can be any integer value from 1 to 100.
  9. Right-click PDSExtension1, click Modify, type ProjectManager.Class#, and then click OK.

    Note Where # is a number that is not already being used. An example is ProjectManager.Class1. The number can be any integer value from 1 to 100.
If you modify and replace an existing PDS Extender on the Microsoft Project Server computer, you must restart Internet Services to overwrite the .dll file.

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

MORE INFORMATION

To see additional information about how to install and register the Project Renamer PDS Extender, visit the following Web site:

Visit the Project Server 2003 SDK for information about how to build custom PDS extensions. For more information, visit the following Web sites:

Modification Type:MinorLast Reviewed:7/27/2006
Keywords:kbProgramming kbsetup kbtshoot kbprb KB867742 kbAudDeveloper