?
Solved

System.Runtime.InteropServices.COMException-->COM component with C# webservice

Posted on 2003-10-24
4
Medium Priority
?
2,807 Views
Last Modified: 2011-09-20
I am trying to use COM component ( I think it was developed in c++)
in a C# webservice..
I am referrring this DLL in my project (interop & everything is fine..)...
But When I try to call a method of one class I am getting following error:

An unhandled exception of type 'System.Web.Services.Protocols.SoapException' occurred in system.windows.forms.dll
Additional information: System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Runtime.InteropServices.COMException (0x80010105): [TempoSoftInterfaceModel.TsSession.1] Y:\TsApiFct\Src\TsSession.cpp(145) : Internal Error.
   at TempoSoftInterfaceModel.TsSessionClass.Open(String DataBase, String Serveur, String User, String PassWord, String Reserved)
   at EMPWS.Service1.sessionTest() in c:\net\testwinonweb\empws\tstws.asmx.cs:line 74
   --- End of inner exception stack trace ---
0
Comment
Question by:netvasu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 9

Accepted Solution

by:
msdixon earned 200 total points
ID: 9617285
it looks like the interop component is throwing the error (Y:\TsApiFct\Src\TsSession.cpp(145)). do you have a try catch block?
0
 

Assisted Solution

by:gyani
gyani earned 200 total points
ID: 11608766
Hi,

generically speaking.....

COM will not propagate a C++ or VC++ exception from the callee to the caller,
even when both the caller and the callee are written in C++/VC++. This catches some COM newcomers off guard,
but it should be no surprise if you recall that COM is language-independent. COM boundaries are language boundaries.
For example ,

 if the caller is written in C and the callee is written in VC++/C++, what would COM do with the VC++/C++ exception?

If your code throws an exception, the caller will see a failure with an HRESULT of 0x80010105 (RPC_E_SERVERFAULT).

Interestingly enough, this is the same error the caller sees if the callee attempts an illegal memory access.

In both cases, the COM runtime isolates the caller of the object from runtime errors inside the object and presents them as server errors.

so this what ur friend has got is nothing wrong but a limitation with the interop.

tell him to wait for the next upgrade from MS, by peanuts and chill..

boss i might not have given him an exact solution but this problem is there and we have to live with it.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

800 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question