This is a multi-part message in MIME format
------=_NextPart_000_53075412
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
------=_NextPart_000_53075412
Content-Type: text/html; name="_alt.0"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment; filename="_alt.0"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4=2E0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html;=
charset=3Dks_c_5601-1987">
<META content=3D"MSHTML 6=2E00=2E3790=2E218" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2><FONT size=3D3>Hi everyone=2E<BR>I'm korean =2ENET
developer=2E<BR>Please forgive my worthless english=2E<BR><BR>Well, I=
developing a
distributed web application using ASP=2ENET with C#=2E<BR>I have a=
six Windows
Server 2003 based web servers and two SQL Server 2000<BR>database=
servers=2E<BR><BR>I create a COM+ pooled component which supports=
Transaction
service<BR>Activation type of this component is Library, and=
enlisted
distributed<BR>transaction by<BR>EnlistDistributedTransaction=
method of
SqlConnection class=2E<BR><BR>I set a connection string as
follow:<BR><BR>**************************************************=
**************************<BR>***********************************=
<BR>Data
source=3D(local);Initial<BR>Catalog=3Ddatabase_name&uid=3Duser_id&a=
mp;pwd=3Dpassword&pooling=3Dfalse&enlist=3Dfalse<BR>***********=
*****************************************************************=
<BR>***********************************<BR><BR>and
create a class as
follow:<BR><BR>**************************************************=
**************************<BR>***********************************=
<BR>[Transaction(TransactionOption=2ESupported)]<BR>[ObjectPooling(=
true)]<BR>[JustInTimeActivation(true)]<BR>public
class InnerComponent : ServicedComponent {<BR> =
private
SqlConnection cn =3D
null;<BR>}<BR>***************************************************=
*************************<BR>***********************************<=
BR><BR>now,
I implements a Constructor and override Activate and Deactivate=
method<BR>like
this:<BR><BR>****************************************************=
************************<BR>***********************************<B=
R>public
InnerComponent() {<BR> if (this=2Ecn =3D=3D=
null)
{<BR> =
this=2Ecn =3D new
SqlConnection(connectString);<BR> &n=
bsp;
this=2Ecn=2EOpen();<BR> =
}<BR>}<BR><BR>protected override
void Activate() {<BR> if=
(ContextUtil=2EIsInTransaction)
{<BR><BR>this=2Ecn=2EEnlistDistributedTransaction((ITransaction)Conte=
xtUtil=2ETransaction);<BR>
}<BR>}<BR><BR>protected override void Deactivate()=
{<BR>
this=2Ecn=2EEnlistDistributedTransaction(null);<BR>}<BR>*************=
***************************************************************<B=
R>***********************************<BR><BR>then
I implement a COM+ component which call the method of
InnerComponent<BR>component with following
attribute:<BR><BR>***********************************************=
*****************************<BR>********************************=
***<BR>Transaction(TransactionOption=2ERequiresNew)<BR>ObjectPoolin=
g(true)<BR>JustInTimeActivation(true)<BR>public
class OuterComponent
{=2E=2E=2E}<BR>********************************************************=
********************<BR>***********************************<BR><B=
R>When
I call the method of InnerComponent component (even if i don't=
show<BR>here)
using OuterComponent,<BR>EnlistDistributedTransaction method=
which called in
Activate method, works<BR>exactly=2E<BR><BR>But I install this=
components on web
server, and call the method of<BR>InnerComponent
component,<BR>EnlistDistributedTransaction method throw
COMException=2E<BR><BR>exception occurs by=
EnlistDistributedTransaction method=2E
but<BR>ContextUtil=2EIsInTransaction property returns true=2E<BR>and=
ContextUtil=2ETransaction property returns a reference of=
__ComObject<BR>but
EnlistDistributedTransaction method doesn't enlisted=
SqlConnection class<BR>to
COM+ transaction context=2E<BR><BR>I installed a Network DTC access=
component and
Network COM+ access component<BR>on all Windows Server 2003 based=
web servers
and SQL Server 2000 based<BR>database servers=2E<BR><BR>The=
"DTCPing" application
which downloads from microsoft=2Ecom reports there<BR>is no problem=
to communicate
between servers=2E<BR>but SqlConnection class can't enlisted COM+
transaction=2E<BR><BR>well, what can I=
do?<BR><BR>regards<BR><BR>webgenie=2E<BR>from
Korea, Republic=
of=2E</FONT><BR><BR><BR></FONT></DIV></BODY></HTML>