Can someone tell me how to retrieve an ActiveX component with an OBJECT tag?
On my ASP file I have retrieved an ActiveX control with the following code:
<OBJECT classid="clsid:A919AF5F-637C-423E-835A-B56448C1AD9B">
</OBJECT>
The result is that the Activex control popup on the web page..so far so good.
The problem is that this piece of code always look for the ActiveX control
on the Client machine, I want the ActiveX control to be retrieved from the
server (of course)
In the documentation for the OBJECT tag, I saw that there was an attribute
called RUNAT=Server that should be included to get the object from the Server
instead, so I tried with the following code to retrieve the ActiveX from
the server instead of the clients machine
<OBJECT RUNAT=Server id=whatevername
classid="clsid:A919AF5F-637C-423E-835A-B56448C1AD9B">
</OBJECT>
…but, when I do like this, the ActiveX control doesn’t show up. Can someone
understand why ?? Is it neccesary to instantiate the “whatever”-id before
I use it in the OBJECT-tag, or can this id be set to whatever value ? ….I
only want the ActiveX to show up in the clients browser, WHAT is wrong ??
ActiveX is a client-side technology only. It is designed to allow COM objects registered on the client machine to be instantiated in the browser.
Therefore, the question you should be asking is “How do I install/register my COM object on the client PC”.
Bascially, you will need to add a
codebaseattribute to yourobjecttag, specifying a URL to your (correctly packaged) ActiveX object. e.g.:The ActiveX object will typically be packaged in a CAB file and, if it was written in .NET, then it will need to be packaged in an MSI inside the CAB file.
For information on deploying a .NET ActiveX component from a web-server, please see my answer here.
For information on deploying a non .NET component, just search Google – it’s much more straightforward than the .NET way!
Finally, if you are in an intranet environment, don’t forget to consider using Active Directory Group Policy, or a similar technology (like SMS), for deploying the ActiveX component – it might be a lot simpler this way.