473,324 Members | 2,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

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

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

May 8 '06 #1
1 2881
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
js*****@gmail.com wrote:
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


May 8 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Athanasius | last post by:
Could someone shed some light as to why the following setTimeout function will not work on the Mac IE5.2? It does however work on PC(Forefox,Netscape,IE) & Mac(Safari,Firefox). Here is the script,...
2
by: Steve | last post by:
I am using an Activex exe com server built using Visual Basic on an ASP.NET web page. The server uses Thread per object. Do I need to use ASPCompat="true" Steve
3
by: Marshall | last post by:
I appear to be having a problem similar to Neil as posted at...
3
by: Angelo Brusati | last post by:
When using VB6 COM objects on a ASP.NET page, and having the @Page directive with the AspCompat attribute set to true, it causes an error like "Method '~' of object '~' failed" or "Object reference...
2
by: R. Todd | last post by:
I noticed today that when I have an ASP.NET web page with AspCompat="true", the CCW count tracked by the peformance monitor increases every time the page is loaded. Clicking refresh causes the...
1
by: Neeraj | last post by:
I am using AspCompat="true" in the page directive from where I am calling Interop written in vb 6.0 which is deployed on COM+ Server. On some pages I am getting the error : Exception Type:...
2
by: tshad | last post by:
This has been driving me crazy. I have been trying to get the error handling working on my system and can get parts of it working and others won't work at all. I found that you can't access...
1
by: Nicholas Palmer | last post by:
Hi all, Got a question about the AspCompat=true page property. First a little background. We have an ASP.NET app that uses two COM components. The first is the Microsoft OWC 11 components and...
2
by: =?Utf-8?B?U2VyZ2lvIE1hcnRpbnM=?= | last post by:
Hi. I have an ActiveX DLL, developed in Visual Basic 6.0 and I need to use that DLL inside an ASP.NET application, developed in Visual Basic .Net 2003. My problem is that in my machine I get the...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.