Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / January 2006

Tip: Looking for answers? Try searching our database.

Late Binding Com : MissingMethodException

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
christof13 - 10 Jan 2006 15:08 GMT
Hi everybody,

I have created a c# module using late-binding to call methods of a com
component.
Everything works fine in a console application but when I use this module in
a web application I've got this exception : System.MissingMethodException:
Method System.__ComObject.MyMethod not found. Here is my code :

Type _UserComType = Type.GetTypeFromProgID("MyDll.MyClass");
object _UserCom = Activator.CreateInstance(_UserComType);

object[] parameters = new object[2];
parameters[0] = "Data1";
parameters[1] = "Data2";

object result = _UserComType.InvokeMember("MyMethod",
BindingFlags.InvokeMethod, null,_UserCom,parameters);

Does anybody have a idea to solve this problem ?
Willy Denoyette [MVP] - 10 Jan 2006 18:57 GMT
Are you sure you COM dll is registered and accessible from asp? And why are
you using late binding?

Willy.

| Hi everybody,
|
[quoted text clipped - 15 lines]
|
| Does anybody have a idea to solve this problem ?
christof13 - 11 Jan 2006 08:55 GMT
The com is well registered and is accessible from asp. It's strange because
the com component is well found and the exception occurs on the method call
(invokemember).

We are migrating a COM module into a .Net module. During the migration
we need to have te possibility to switch between both module. When the
migration will be over we don't want to recompile the project to remove the
com reference.
This is the reason why I am using late binding.

> Are you sure you COM dll is registered and accessible from asp? And why are
> you using late binding?
[quoted text clipped - 21 lines]
> |
> | Does anybody have a idea to solve this problem ?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.