Tuesday, October 25, 2005

Book : Advanced Microsoft Content Management Server Development (Updated)

MCMS Manager 5.1

This release includes,

1. Posting Size Checker - a new tool to check the size of Postings
2. UI Improvements
3. Channel level Posting Submit/Approve

Get the new version from here. For more information check MCMS Manager site.

Thursday, October 20, 2005

Maximum uploadable size of a Resource to Resource Gallery

Resource can be uploaded to resource galleries via Site Manager as well as via Resource Manager (web author). The size of the resource file which can be uploaded via Resource Manager can be changed by modifying the httpRuntime attribute in the relevant web.config file (a sample for that with explanation can be found here – MCMS faq).

Site Manager uses underlying ASP service to interact with MCMS server. So to change the upload resource size via Site Manager, some modification should be done in the IIS MetaBase.xml/service depending on Maximum size. If the maximum size is less than 100000 bytes, follow Step 1. Otherwise follow Step 2.

Step 1 - To restrict the size less than 100000 bytes:

  • Open MetaBase.xml file – this can be found in <windows installation path>\system32\inetsrv
  • Go to
    <IIsWebDirectory Location ="/LM/W3SVC/1/ROOT/NR/System/ResUpload"

    Set the AspMaxRequestEntityAllowed to required maximum size – it should be in bytes and less than 100000 bytes.
  • Stop the IIS (iisreset /stop).
  • Save MetaBase.xml(before saving, make a copy of that file).
  • Now start the IIS (iisreset /start).

Step 2 - To restrict the size more than or equal to 100000 bytes:

  • Asp service (Site Manager uses this to interact with MCMS Server) counts 100000 bytes as a chunk. So if the size is 100000 bytes or more, it will be divided in to 100000 byte chunks, so it will get uploaded without the maximum limit boundary which can be specified in Step1 – to avoid this must validate this in asp service.
  • Open resupload.asp in notepad – it can be found in <MCMS Installation folder>\Server\IIS_NR\System\ResUpload – have a copy of it before doing any modification.
  • WriteFile function should be modified. Add the code(bold) given below before the creation of “AEBinFile.AEBinFile.1” object.

    if len(strFileExt)=0 then
    end if
    Dim maxSize
    maxSize = 1000000 ' maximum size of upload specified in MetaBase.xml
    nCount = Request.TotalBytes
    if nCount > maxSize then
    Response.Status = "500" 'Some error....
    end if
    Set BinFile = Server.CreateObject("AEBinFile.AEBinFile.1")

Note: As modifying resupload.asp is not supported, take precautions before using the 2nd method.

Wednesday, October 12, 2005

MCMS Manager 5.0

This release includes,

1. Posting Comparer (new tool) - can compare postings/posting revisions
2. Resource Properties Editor - to edit Resource Properties
3. XML Editor - to edit XmlPlaceholder content

Get the new version from here. For more information check MCMS Manager site. Please post your feedbacks!

MCMS Manager Performance Test (Initialization)

Performance test for MCMS Manager was done with Search enabled (otherwise it must not take more than 5 sec to initialize).

Machine Configuration

Processor - Intel Pentium 4 Mobile CPU 1.80GHz
RAM - 256MB
O/S - Windows 2003

MCMS Configuration

Postings - 2982 (size - 8.5mb)
Resources - 50 (size - 0.5mb)
Templates - 20 (size - 0mb)

Total Application Size 9.0mb (here size is the size of objects generated by MCMS Manager).

Web Service (in the same machine) took 117.7800 Sec to initialize where as Local API took 72.7053 Sec.

Monday, October 10, 2005

Accessing Postings via HttpWebRequest/WebClient

After the post - Using CompareHTML to compare postings , few people asked me - how to access postings via WebClient.

Normally when we try to access posting via HttpWebRequest/WebClient, it will return "The remote server returned an error: (500) Internal Server Error."

The reason for the 500 server error is that authoring with MCMS is only supported with IE. And IE will always send the user agent string. So the code in WebAuthor requires this user agent string and does not check for this. As access with a user higher as subscriber is always treated as authoring the problem the above error will occur (thanks Stefan – for giving the correct reason!).

To avoid the above error when accessing a posting with a higher role than subscriber, it is required to specify the “User Agent”.

Via HttpWebRequest
HttpWebRequest httpWebRequest = (HttpWebRequest)WebRequest.Create("url of the posting");
NetworkCredential networkCredential = new
httpWebRequest.Credentials = networkCredential;
httpWebRequest.UserAgent = "Mozilla/4.0+";
//UserAgent should be specified before getting the response.
HttpWebResponse webResponse = (HttpWebResponse)httpWebRequest.GetResponse();

Via WebClient
WebClient webClient = new WebClient();
NetworkCredential networkCredential = new
webClient.Credentials = networkCredential;
//User-Agent should be specified in header before getting the response.
Stream webStream= webClient.OpenRead("url of the posting");

Thursday, October 06, 2005

MCMS Manager 4.4

This version includes,

1. UI enhancements.
2. Mei Ying's HyperLink Dependency Report Generator - I've made some modifications to fit MCMS Manager.
3. Disabled Search - so that if search is not necessary, it can be disabled - will increase the performance of MCMS Manager.

It can be downloaded from here. For more information check MCMS Manager Site.