Tales from the field: IIS 7.x / COM+ migration tip

Jonathan Yong is back with this quick ‘tip of the day’. Relevant if you are migrating an older COM+ application to Windows 2008 or above.

If you have a COM+ component which is called by classic ASP page and after you migrate the application to IIS 7.x or above, you may encounter runtime error ‘This object is meant to be called by ASP pages only’ every time the ASP page call some methods in the COM component.

A hypothetical code repro is as follow:

Set myCom = Server.CreateObject("ComApp.Bar")

’Call to this method cause runtime error

This happen if the method internally access ASP Request or Response object, or what we technically call the Intrinsic objects. It turn out that in Windows Server 2008 and above, if COM+ component need to access intrinsic object, there is an additional configuration you need to turn on in COM+ component.

Open Component Services, right click on the COM component -> Advanced tab -> check the ‘Allow IIS intrinsic properties’. Then restart the COM+ application and recycle the IIS app pool running the ASP application. Here is a quick illustration:

COM+ Intrinsic Property setting

Original content from Jonathan Yong; posted by MSPFE Editor Arvind Shyamsundar

Comments (0)

Skip to main content