Microsoft KB Archive/321302

= BUG: GetByPath Published API Does Not Work with Host Header Name Turned On =

Article ID: 321302

Article Last Modified on 8/6/2002

-

APPLIES TO


 * Microsoft Content Management Server 2001 Service Pack 1

-



This article was previously published under Q321302



SYMPTOMS
Hyperlinks that you make by using Autosession.Searches.GetByPath may not work correctly. This may occur if the Host Header Name feature on a Content Management Server 2001-based computer that is using Server Configuration Application (SCA) is turned on. For example, hyperlinks to /Channels/Site1/Default.htm may link to /Channels/Site2/Default.htm.



CAUSE
The returned value of Autosession.Searches.GetByPath is cached in Content Management Server for performance reasons. With the Host Header Name mapping feature turned on, Content Management Server caches the URL with channel-specific information. The hyperlink URL that is generated is packaged differently than when the Host Header Name mapping feature is turned off.

Published API Call
Autosession.Searches.GetByPath(&quot;/Channels/Site1/default&quot;) is called on a page that is located under /Channels/Site1.

Value Returned and Cached from the PAPI Call
&quot;Site1/default.htm&quot;

Hyperlink URL (Host Header Name turned on): &quot;HTTP://Site1/default.htm&quot; Hyperlink URL (Host Header Name turned off): &quot;HTTP:// /Site1/default.htm

The published API returns and caches a string of &quot;Site1/default.htm&quot; for a search string of &quot;/default&quot;. When this PAPI is called again with &quot;/default&quot; as the search string, it automatically returns the cached value of &quot;Site1/default.htm&quot;. This is not a problem if the Host Header Name feature is turned off because the final URL is packaged to include the server name. However, if the Host Header Name feature is turned on, the final URL does not contain the server-specific information, and always links to /Channels/Site1/Default.htm regardless of whether the PAPI call is instantiated under &quot;/Channels/Site1&quot;, &quot;/Channels/Site2&quot;, or &quot;/Channels/Site3&quot;.



RESOLUTION
If you must turn on the Host Header Name feature on a Content Management Server site, use the Autosession.Searches.GetByGUID published API instead of the Autosession.Searches.GetByPath published API.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

Additional query words: hhn mcms papi

Keywords: kbbug kbenv KB321302

-

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

© Microsoft Corporation. All rights reserved.