MCMS 2002 Console Writes Postback From Action Address by Using an Absolute URI (813867)
The information in this article applies to:
- Microsoft Content Management Server 2002
SYMPTOMSMicrosoft Content Management Server (MCMS) 2002 DefaultConsole writes postback from an action address by using an absolute URI.
If you reverse proxy the MCMS 2002 server by using a proxy server that does not
forward the original header to the MCMS server, clients cannot use the Web
author console. When you view the HTML ouptut of an MCMS page, you see
references to the server name that look similar to the following: <base href="http://servername/WoodgroveNet/Templates/Home.aspx?wbc_purpose=Basic&NRMODE=Unpublished...">
...
var __CMS_CurrentUrl = 'http://servername/WoodgroveNet/Templates/Home.aspx?wbc_purpose=Basic&NRMODE=Unpublished...';
...
__CMS_PostbackForm.action = 'http://servername/CMSNoURI/Templates/CmsTemplate1.aspx?wbc_purpose=Authoring&NRMODE=Update&...';
CAUSEBecause some proxy servers do not forward the original HTTP
header to the MCMS server, the reverse proxy server uses the server NetBIOS
name to perform the HTTP request to the MCMS 2002 server. When the client
switches to Edit mode, the client cannot use the default console because the Console and RobotMetaTag classes use an aboslute URI with the server name instead of an
absolute path and query string.RESOLUTIONService pack information
To resolve this problem, obtain the latest service pack for Microsoft Content Management Server 2002. For more information, click the following article number to view the article in the Microsoft Knowledge Base:
906142 How to obtain the latest Content Management Server 2002 service pack
Hotfix information
The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
Date Time Version Size File name
------------------------------------------------------------------------------------
10-Dec-2002 21:52 4.0.1381.4 65,600 Cmsupdate.exe
19-Feb-2003 00:40 5.0.1590.0 188,416 Microsoft.contentmanagement.webcontrols.dll
14-Feb-2003 22:58 1,717 Update.inf To install the fix:
- Run Cmsupdate.exe to install the updated DLL
file.
- Run Gacutil.exe from the command line:
cd "\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin" gacutil /i "C:\Program Files\Microsoft Content Management Server\Server\bin\Microsoft.ContentManagement.WebControls.dll"
WORKAROUNDBased on the WoodgroveNet sample site, you can make the
following changes to the solution to remove the absolute URI in the content
that is served:
- Change the BASE HREF tag:
- Edit the WoodgroveNet\UserControls\HeadTags.ascx.cs
code-behind file.
- Add the following line of code in the Page_Load function definition:
RobotMetaTag1.RenderBaseHref = false;
- Change the PostBackForm addresses. To do this, in each template of the site, override the
RegisterClientScriptBlock function to remove all occurrences of "http://servername" if the
script block contains the "__CMS_PostbackForm" string. Insert this new function
definition in the Page public class definition. After you make the change, the code
looks similar to the following:
namespace WoodgroveNet.Templates
{
Public class Home : System.Web.UI.Page
{
#region CMS Placeholders
#region Public Properties
#region Page Load
#region override RegisterClientScriptBlock added by yanno
public override void RegisterClientScriptBlock(string blockname, string script)
{
Regex cmsregex = new Regex(@"__CMS_PostbackForm");
Regex httpregex = new Regex(@"(http://[^/]*)");
if ( cmsregex.IsMatch(script,1) )
script = httpregex.Replace(script, "");
base.RegisterClientScriptBlock(blockname, script);
}
#endregion override RegisterClientScriptBlock
#region Web Form Designer generated code
}
} - Change the Login/Logout Header button:
- Edit the WoodgroveNet\UserControls\Header.ascx.cs
code-behind file.
- Change the HeaderLoginLogoff_Click function at line 63 from
Response.Redirect(Request.Url.AbsoluteURI); to: Response.Redirect(Request.Url.PathAndQuery);
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed in the "Applies to" section.
This problem was corrected in Content Management Server 2002 Service Pack 1.
MORE INFORMATIONThis fix changes the behavior of the Console class but does not change the way the RobotMetaTag object formats the BASE HREF address. To prevent the BASE HREF
address from being rendered, follow the steps in the "Workaround"
section.
Modification Type: | Major | Last Reviewed: | 12/7/2005 |
---|
Keywords: | kbContentMgtServ2002sp1fix kbHotfixServer kbQFE kbprb KB813867 |
---|
|