Solved

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

Posted on 2003-10-24
4
2,793 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 50 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 50 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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

695 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