Conversions for dates, times, and some data types return unexpected results with differences in locale, when you create Microsoft Project Data Service (PDS) extensions in Visual Studio .NET (867743)



The information in this article applies to:

  • Microsoft Office Project Server 2003
  • Microsoft Visual Studio .NET (2003), Professional Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
  • Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
  • Microsoft Visual Studio .NET (2003), Academic Edition

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

When you develop Microsoft Project Data Service (PDS) extensions in Microsoft Visual Studio .NET (2003), conversions for dates, times, and some data types may return unexpected results.

CAUSE

This problem may occur if locale differences exist between the development environment, where the extension runs under the developer's account profile, and the Microsoft Project Server PDS environment where the extension runs.

RESOLUTION

Modify the Microsoft Windows registry

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.

If you have trouble with different locale dates, examine the date formats in the registry. To do this, follow these steps:
  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate and then click to select the following registry key:

    HKEY_USERS\.DEFAULT\Control Panel\International

  3. Right-click sShortDate, click Modify, type the date format that you want, and then click OK.
  4. Right-click sTimeFormat, click Modify, type the time format that you want, and then click OK.

Programmatically convert the date and time

Specify a ToString() conversion string that supplies an IFormatProvider method that uses a CultureInfo class that is correctly set up.

For detailed information about how to programmatically convert the date and time, visit the following Microsoft Web site:

STATUS

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

MORE INFORMATION

The PDS thread runs in the context of an account that depends on the version of Microsoft Internet Information Services (IIS).

In IIS 5.1, the account is the account of the user who makes the PDS call and IIS uses Integrated Windows Authentication. Integrated Windows Authentication was formerly referred to as NTLM or Microsoft Windows NT Challenge/Response authentication.

IIS 6.0 uses the Network Service security account for the Microsoft Project Server Application Pool. To view the Network Service security account, follow these steps:
  1. Click Start, click Control Panel, double-click Administrative Tools, and then double-click Internet Information Services.
  2. Expand Application Pools.
  3. Right-click MSPS2003AppPool, and then click Properties.
  4. In the MSPS2003AppPool Properties dialog box, click the Identity tab.
If this account does not have a specific profile on the server, the account uses the locale settings from the default profile. The default profile may have a locale setting or PDS Thread Locale that is different from your own account.

For more information about PDS Thread Locale and information about how to create a managed code PDS extension for Microsoft Office Project Server 2003, visit the following Microsoft Web site:

Modification Type:MinorLast Reviewed:8/29/2006
Keywords:kbtshoot kbprb KB867743 kbAudDeveloper