tags:

views:

49

answers:

2

I have an API DLL which is a COM object. I’ve used this DLL in a Winforms application successfully. When I use it in ASP.NET application I get the E_OUTOFMEMORY error: “Creating an instance of the COM component with CLSID {} from the IClassFactory failed due to the following error: 8007000e” when I create an instance of the COM object.

Although I don’t think it is a security issue, I’ve tried using windows authentication and also to give privileges to the ASPNET user with no use.

I don’t have the source code of the COM object. I'm using .NET Framework 3.5.

Thanks in advance, Sharon.

A: 

Visual Studio / Tools / Error Lookup reveals:

"Not enough storage is available to complete this operation."

This isn't necessarily an OOM exception, I've had cases in serialization where deserializing the object size silently failed returning -1, and the subsequent allocation failed with an OOM exception (because usually (unsigned)-1 == all memory except one element).

peterchen
I thing that the actual message depends on the source of the error. Anyway. .NET wraps it with system.outofmemoryexception. this can be the scenario in this case, but i don't have the source code of the COM object so I can't check it. I'm trying to contact the developer of the API, but I'm not sure he can help.
Sharon
*"depends on the source"* - that's should be the case only if the Facility is FACILITY_ITF (0x8004xxxx). This one's a ` HRESULT_FROM_WIN32`, which should be independent of the interface.
peterchen
OK, I accept the correction. But it still has similar meaning (or am I missing something here?). The main difference between the two applications is that the first one is winforms and the second is ASP.NET. If I knew what the COM object is doing in its instantiation, I could tell if the reported error is the result of previous error. How can I continue the investigation without having the source code?
Sharon
generally: Try to reproduce in a minimal environment, if it still occurs, ask thedevelopers. If it doesn't, check the differences between the two environments, and eliminate them one by one.
peterchen
A: 

After hours of investigation we found that the problem is in the API.

Thanks for everyone.

Sharon.

Sharon