469,579 Members | 1,296 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,579 developers. It's quick & easy.

Help: ActiveX Component in C#/ASP.NET

Ted
I'm using a 3rd party ActiveX control which has it's own constructor and two
very methods (which ultimately sends out messages on the server's USB or
serial port). I am trying to run this ActiveX component in my ASP.NET
applicaiton. For now, I'm testing this application via localhost connection.

At first, within the Page_Load method, I successfully instantiate it using
the constructor:
try
{
oABC = new ABCClass();
Response.Write("oABC object was created");
}
catch ..

Later, upon a button press, I try to use the method(s) within oABC -- again,
it appears everything works:
try
{
Object err;
err = oABC.Method1( "xxx", "xxx", null, null); // oABC is accessible
within this btnClick function
Response.Write("Method1 Succeeded - err = " + err.ToString());
}
catch ...

Unfortunately, Method1 doesn't appear to send out a serial/USB message.
However, Method1 works fine if I use IE to a very similarily-coded
VBScript/HTML file located at the same IIS directory location. I'm confused
at what might be the problem.

Here are some questions I have:
1. Because the instantiation is done within Page_Load, I assume the ActiveX
component is being run at the server - is this true? If so, is there any
configuration or server-side registration I need to do to ensure it's
availability to my application? Could there be any serial/USB/device
security settings which IIS tries limit?
2. For the VB script/html file, the ActiveX component runs on the client -
right?
3. I have run "RegSvr32 oABC.dll" on the component within the virtual
directory which is the source of my ASP.NET application - is this sufficient
or do I even have to do this?

Dazed and confused,
Ted
Jul 21 '05 #1
0 1200

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Wilfried Mestdagh | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.