Microsoft KB Archive/813867

= MCMS 2002 Console Writes Postback From Action Address by Using an Absolute URI =

Article ID: 813867

Article Last Modified on 12/7/2005

-

APPLIES TO


 * Microsoft Content Management Server 2002

-



SYMPTOMS
Microsoft 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:  ... 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&...';



CAUSE
Because 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.



Service 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 &quot;\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin&quot;

gacutil /i &quot;C:\Program Files\Microsoft Content Management Server\Server\bin\Microsoft.ContentManagement.WebControls.dll&quot;





WORKAROUND
Based 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.</li>  Add the following line of code in the Page_Load function definition: RobotMetaTag1.RenderBaseHref = false; </li></ol> </li> Change the PostBackForm addresses. To do this, in each template of the site, override the RegisterClientScriptBlock function to remove all occurrences of &quot;http://servername&quot; if the script block contains the &quot;__CMS_PostbackForm&quot; 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(@&quot;__CMS_PostbackForm&quot;); Regex httpregex = new Regex(@&quot;(http://[^/]*)&quot;);

if ( cmsregex.IsMatch(script,1) ) script = httpregex.Replace(script, &quot;&quot;); base.RegisterClientScriptBlock(blockname, script); }       #endregion override RegisterClientScriptBlock

#region Web Form Designer generated code } }

</li> Change the Login/Logout Header button:  Edit the WoodgroveNet\UserControls\Header.ascx.cs code-behind file.</li>  Change the HeaderLoginLogoff_Click function at line 63 from Response.Redirect(Request.Url.AbsoluteURI); to: Response.Redirect(Request.Url.PathAndQuery); </li></ol> </li></ol>

<div class="status_section">

STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed in the &quot;Applies to&quot; section. This problem was corrected in Content Management Server 2002 Service Pack 1.

<div class="moreinformation_section">

MORE INFORMATION
This 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 &quot;Workaround&quot; section.

Keywords: kbcontentmgtserv2002sp1fix kbqfe kbprb kbhotfixserver KB813867

-

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

© Microsoft Corporation. All rights reserved.