06-01-04 04:53 AM
I had the same problem, and have been trying to sort it out for the last wee
k. I is very maddening, because there is virtually nothing online for the pr
oblem. I did find a solution, that is as follows.
This is in IIS 6.0 / 2003. The problem never occured with IIS 5.0 / 2000.
My web apps (in both ASP or ASP.Net) are consuming .Net derived Enterprise S
ervices. The problem you described occured when then Enterprise Service is n
ot destroyed properly.
The simply solution is that obj.Destroy() must be called for each Enterprise
Service. The Destroy method is part of the Enterprise Service class, and is
accessed via the IUnknown interface. You must shadow the method, to be able
to add it to the interface
defined for your own class. The Enterprise Service base class will not allow
it to be overidden.
This is simple enough. But there was a futher complication with what I was d
oing. My web app would call --> Enterprise Service 1 which would then call -
-> Enterprise Service 2. Enterprise Service 2 runs as a statefull object. (I
t contained cached XSLT's.)
To dispose of the COM+ applicatons in the proper order, I had to add a Close
method to each Enterprise Service as well as expose the Dispose method with
in the classes interface. The Close method would dispose of any other Enterp
rise Services held by that
object. The Destroy method destroys the Enterprise Service for the object.
The destruction sequence must go:
a) Web app calls Close for ES1
b) ES1's Close method calls Close and Destroy for ES2.
c) Web app calls Destroy for ES1.
If you call Destroy from the Close method, you end up with intermitent COM+
Application crashes. The Enterprise Service Destroy method cannot be called
internally. It must be called by the client.
To add confussion to the whole business, not destroying ES2 correctly will r
esult in ES1 failing on a subsequent page request followed by other unrelate
d Enterprise Services calls made by the web app on later page requests. (Up
to five minutes later!) The
lengthy time lapse between failures can make the events appear disconnected.
However, they will all trace back to (a single instance) of improper object
destruction.
----------------------------------------------
sent via http://www.biztalkug.com
all about BizTalk
[ Post a follow-up to this message ]
|