ActiveX in .net service

G

Gancy

Hi,
I have .net service written in C#. This srevice uses a third party
ActiveX for SNMP services. This ActiveX listens on port 162 and fires
an event for ever SNMP response received. My program works fine on a
Windows Forms appliction. However, SNMP response events are not fired
from .Net service program.

I have heard about .net service having problems with COM based
compoenents. But i really do not know what these problems are. If
really there is any problem, then i must agree with Mr Richard Grimes
(http://www.richardgrimes.com/) on "Why there are no .Net Services in
new MS OSs". Anyway, that's a different story. Has anybody come
across problems with COM and .Net Service?

Thanks & Regards
- Gancy
 
M

Mehdi

I have .net service written in C#. This srevice uses a third party
ActiveX for SNMP services. This ActiveX listens on port 162 and fires
an event for ever SNMP response received. My program works fine on a
Windows Forms appliction. However, SNMP response events are not fired
from .Net service program.

I have heard about .net service having problems with COM based
compoenents. But i really do not know what these problems are.

I'm not that familiar with all COM subtelties but i know that some (or
all?) COM object must run in a STA thread that has and pumps a message
queue in order to function properly. A normal Windows application typically
has a message queue (which is created and started whenever you call
Application.Run() or Form.ShowDialog()). Windows Services do not have a
message queue by default so your problem might be there.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top