BUG: GetByPath Published API Does Not Work with Host Header Name Turned On (321302)
The information in this article applies to:
- Microsoft Content Management Server 2001 SP1
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.
ExamplePublished API Call
Autosession.Searches.GetByPath("/Channels/Site1/default") is called on a page that is located under /Channels/Site1.
Value Returned and Cached from the PAPI Call
"Site1/default.htm"
Hyperlink URL (Host Header Name turned on): "HTTP://Site1/default.htm"
Hyperlink URL (Host Header Name turned off): "HTTP://server name/Site1/default.htm
The published API returns and caches a string of "Site1/default.htm" for a search string of "/default". When this PAPI is called again with "/default" as the search string, it automatically returns the cached value of "Site1/default.htm". 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 "/Channels/Site1", "/Channels/Site2", or "/Channels/Site3".
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.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 8/6/2002 |
---|
Keywords: | kbbug kbenv KB321302 |
---|
|