?
Solved

An unhandled exception of type

Posted on 2003-11-19
8
Medium Priority
?
716 Views
Last Modified: 2013-12-03
Hi i am trying to run a c sharp application which uses a class library, the class library uses the System.runtime.interopservices namespace.


when i compile the project i get no errors but when i run the project i get the following:

An unhandled exception of type 'System.Runtime.Interopservices.comexception' occured in sncl.dll

Additional information: Com object with CLSID {499C0c20-A766-11cF-8011-00A0c90A8F78} is either not valid or not registered.

can someone help as this is urgent.
regards Chris
0
Comment
Question by:chris_shadow
[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
8 Comments
 
LVL 9

Expert Comment

by:WinterMuteUK
ID: 9781261
If you put the code into a try/catch thingy, you might be able to get a clearer response:
try {
     <your code>
}
catch (Exception ex) {MessageBox.Show(ex.ToString());}
0
 

Author Comment

by:chris_shadow
ID: 9781303
tried exactly the same error messages
0
 
LVL 15

Expert Comment

by:SRigney
ID: 9781365
Are you trying to run the code on the same machine you wrote it on?

Does it still run through the IDE?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:chris_shadow
ID: 9781572
yep i am running on the same machine, i dont understand why im getting an error with system.runtime.interopservices


silly question but does anyone know of a component set to communicate with a pocket pc, i cant use activesync as i need programatically handle up to 10 pocket pcs at the same time.

chears
0
 
LVL 15

Expert Comment

by:SRigney
ID: 9781673
Are you running from the Release folder, or did you try moving files around?

Not sure on the PocketPC question, you'll be much better off posting this as an additional question.  I'm sure there are some experts out there that may miss the oportunity to answer that question because they don't look into the question about your unhandled exception type.
0
 

Author Comment

by:chris_shadow
ID: 9781849
im runnig from the debug folder
0
 
LVL 4

Expert Comment

by:wile_e_coyote
ID: 9782166
I think this exception means that your .NET code is attempting to call an unregistered COM DLL.     Are you using any COM components?
0
 
LVL 6

Accepted Solution

by:
purpleblob earned 2000 total points
ID: 9786137
The error message you are getting is fairly self explanatory (if it's telling the turth :-) ), it would appear that the COM object you're trying to talk to has not been registered on the machine that you're running the .NET application from.

How did you reference the COM object, i.e. did you create the interop by adding a reference to the COM object ? Are you running the .NET application from the machine that the COM object is registered on ?

I quickly checked my registry on this - the CLSID is that of the Connection Manager. You could do a search of the registry (if you're happy interacting with the registry) and check the CLSID actually exists.

Note: as COM object's are instantiated as and when required you will find that the application will compile fine, it's at the point of CreateInstance (which happens in the interop) where the CLSID will be passed into and then will fail if the object does not exist).

Hope this helps

0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone 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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
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…
Suggested Courses

764 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