Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2003-10-24
4
Medium Priority
?
2,826 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …

636 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