Microsoft KB Archive/867742

= You cannot access a PDS extension from Project Server 2003 =

Article ID: 867742

Article Last Modified on 5/8/2007

-

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:  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:   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   The following code signature is for Microsoft .NET:

[ComVisible(true)] public string XMLRequest(_ string Xml, _ string User, _ string Connect, _ int DatabaseType, _ ref short Handled)   The following code signature is for .NET (XMLRequestEx variant ): [ComVisible(true)] public string XMLRequestEx(string sXML, string sPDSInfoEx,                                 ref short nHandled)   Register the PDS as a COM object. To do this, follow these steps:  Set the class with the required attributes for COM interoperability.</li> 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(&quot;EAA49654-65E3-4BC5-BCC7-E465264323D5&quot;),

ComVisible(true),

ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]</li> Add the XMLRequestEX method by using the required parameter layout.</li> Add the method calls that validate the request and provide error handling.</li></ol> </li> 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: <ul> Have the correct XmlRequestEx or XmlRequestEx signature.</li> 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:  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.</li> Click Start, click Accessories, and then click Windows Explorer.</li> Locate your assembly.dll file, right-click the assembly.dll file, and then click Copy.</li> 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.</li></ol> </li></ul> </li> To install a .NET PDS extension, follow these steps:  <li>Click Start, click Run, type iisreset /STOP in the Open box, and then click OK.</li> <li>Copy the .dll extension module file to a binary folder.

Note We recommended that BIN be used as the binary folder. The placeholder  is the Project Server folder. Typically, the C:\Program Files\Microsoft Office Project Server 2003\ folder is the  Project Server folder.</li> <li>Repeat step b for any additional assemblies.</li> <li>Click Start, click Run, type command in the Open box, and then click OK.</li> <li>Type RegAsm &quot;%PROGRAM%BIN\PdsExtension.dll&quot; /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.</li> <li>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:

http://msdn2.microsoft.com/en-us/library/aa168132(office.11).aspx

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 &quot;How to manually register the PDS extender&quot; section.

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

http://msdn2.microsoft.com/en-us/library/aa164648(office.10).aspx

</li></ol> </li></ol>

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. <ol> <li>Click Start, click Run, type command in the Open box, and then click OK.</li> <li>Locate and then change your path of the folder that contains the ProjectManager.dll file.</li> <li>Type REGSVR32 ProjectManager.dll, and then press the ENTER key.

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

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

</li> <li>Point to New, and then click String Value.</li> <li>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.</li> <li>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.</li></ol>

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.

<div class="status_section">

STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.

<div class="moreinformation_section">

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

http://msdn2.microsoft.com/en-us/library/aa204865(office.11).aspx

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

http://msdn2.microsoft.com/en-us/library/aa164648(office.10).aspx

http://msdn2.microsoft.com/en-us/library/aa168132(office.11).aspx

Keywords: kbprogramming kbsetup kbtshoot kbprb KB867742

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.