Click here to Skip to main content
15,868,349 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello,

I have this .NET library class that inherits an abstract class. I found several tutorials on how to make the class/methods and properties visible as a COM object. Also, I was able to register the Active X on the system.

C#
[ProgId("Class1")]
[ClassInterface(ClassInterfaceType.None)]
[Guid("11EABF82-A840-48AE-B11A-A05DCAFCD0D4")]
[ComVisible(true)] 
public class Class1 : BaseClass {
....
}


For my javascript, I was able to call methods and parameters in the class that are not defined in the abstract class. However, when I try to call methods and parameters defined in my the abstract class, I get "Object method or property not supported"

Ex.
C#
[ComVisible(true)] 
protected override string Method1() { ... }


Is there any way to fix this? Any help would be appreciated.

Thanks in Advance
Posted
Updated 4-Jan-13 8:14am
v2

1 solution

ActiveX used on the client size is evil, really. First of all, this is proprietary technology, so browsers are not obliged to support it and often don't or do via some plug-ins which many user's won't install. Especially on non-Microsoft platforms. What, developing application only for the users of Internet Explorer (basically)? I would not call it Web.

Also, this is notoriously unsafe. The literate users will deny using your application if they learn that you use ActiveX on client side. Using it violates isolation and privacy of local systems, as, in principle, ActiveX component can get the same access as the current user. In contrast, standard Web technologies are safe; they are designed to isolate local systems from Web application to guarantee safety.

So, I see no sense in using it, but a lot of potential harm. I would advise to avoid it, by all means.

—SA
 
Share this answer
 
Comments
dbzx734 4-Jan-13 18:33pm    
How else would I be able to call the functiosn from my Library class using javascript?
Sergey Alexandrovich Kryukov 4-Jan-13 19:05pm    
The question is: why? You cannot. The idea of a Web application is that is fully executed by a browser. It's limiting, but safe.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900