Microsoft KB Archive/297366

= BUG: Using SoapSerializer on the Server from a Process Other Than ASP Listener Fails =

Article ID: 297366

Article Last Modified on 5/17/2002

-

APPLIES TO


 * Microsoft SOAP Toolkit 2.0

-



This article was previously published under Q297366



SYMPTOMS
When you use the low-level Application Programming Interface (API) SoapSerializer component from a process other than the ASP listener on the server, you encounter unexpected behavior.

The SoapSerializer object provides a mechanism to manually build a Simple Object Access Protocol (SOAP) message. You can use SoapSerializer in a low-level API scenario on the server to build up the SOAP Response message. In this case, SoapSerializer is initialized with the Active Server Pages (ASP) Response object. If the SoapSerializer calls are made from a process other than the ASP Listener, as in the following scenarios, you receive unexpected results:
 * The SoapSerializer calls are made from a Component Object Model (COM) component that is placed in a COM+ server application.
 * The SoapSerializer calls are made from a COM component that is placed in a Microsoft Transaction Server (MTS) server package.
 * The SoapSerializer calls are made from a COM component that is being debugged from the Microsoft Visual Basic Integrated Development Environment (IDE).

In all three scenarios, SoapSerializer calls are made from a process other than the ASP Listener. This problem does not affect any high-level API scenarios (such as the SoapClient or the SoapServer object).



CAUSE
On the server, SoapSerializer is initialized with the ASP Response object. The SoapSerializer implementation makes a call to the ASP Response object to set the Content-Type header. Currently, this call fails when it is an out-of-process call.



RESOLUTION
To work around this problem, ensure that the code that makes the SoapSerializer calls runs in-process to the ASP Listener page. For example, make the SoapSerializer calls directly in the ASP Listener page.

If the SoapSerializer calls are made from a COM component, the COM component must be configured to run in one of the following ways:


 * If the COM component is running in COM+, make the COM+ application a library application.
 * If the COM component is running in MTS, make the MTS package a library package.
 * Ensure that the COM component is run as a regular, in-process COM server.



STATUS
Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce Behavior
You can use the DocSample2 sample to reproduce this problem. The DocSample2 sample is provided in the SOAP Toolkit 2.0 documentation under the &quot;Using a Low Level API for SOAP Messages&quot; topic.
 * 1) Follow the steps in the documentation to set up the DocSample2 sample.
 * 2) Place the DocSample2.CalcSrv COM component in a COM+ server application. If you are running Microsoft Windows NT 4.0 Server Service Pack 6a (SP6a), place the DocSample2.CalcSrv COM component in an MTS server package.
 * 3) Run the client.

Keywords: kbbug kbpending KB297366

-

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

© Microsoft Corporation. All rights reserved.