AspCompat mysitcally stops working? (There is no MTX Object Context)

J

jsgough

Hello,

I was writing some code using ASP.NET 2.0 that consumed a COM library
via interop on Friday and everything was working fine until about
thirty minutes before I left for the day (isn't it always that way?).
Then, I started getting the message:

There is no MTS object context (Exception from HRESULT: 0x8004E004)

Exception Details: System.Runtime.InteropServices.COMException: There
is no MTS object context (Exception from HRESULT: 0x8004E004)

Earlier in the day, I was able to step all the way into the C++ code in
the debugger and see all of the execution, but when this error started
happening, when I attempted to step into a method call, the error would
be thrown, indicating that the "real" object is not there or accessible
for some reason. The error is thrown at the point the C++ code requests
the context of an IIS intrinsic object.

I may have unintentially changed a setting or something somewhere that
limits this permission or something, but I cannot find where this would
have been done. If anyone has experienced something like this before,
please share any thoughts...

Strangely, similar code is still working in another project, but I
still can't see what the difference in the project files is.

Thank you,
Josh
 
J

jsgough

I think I figured this out,
I was attempting to perform some operations in
Application_AcquireRequestState, but the calls to C++ were requesting
C++ to access the Session object, so it was not available yet.
The other code that was working in another app was doing this outside
of that event, so that was why it continued to work. The mystical part
was the moving the code to AcquireRequestState, on my part :)

Josh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,528
Members
45,000
Latest member
MurrayKeync

Latest Threads

Top