Home All Groups Group Topic Archive Search About

ActiveX in .net service

Author
29 Mar 2006 10:27 AM
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

Author
29 Mar 2006 3:57 PM
Mehdi
On 29 Mar 2006 02:27:59 -0800, Gancy wrote:

> 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.

AddThis Social Bookmark Button