views:

114

answers:

3

I made a COM object with c# and let VS register it for me. I can see it in registry and if I make a test app I can add a reference to it and it works as expected with all the methods available and functional.

Now If I try and use it in a MSMQ rule nothing happens. It will not be invoked. Is this because it is a .NET assembly? Is it because I do not have VS Pro? Do you have any idea at all?

A: 

You need to check the system event log for error messages (eventvwr.exe). If your component is registered and MSMQ is properly configured to activate your component but it fails, most likely the problem is with permissions. The event log should contain the details of the prolem.

Remus Rusanu
The event just states that the component cannot be found. I've researched this and other people have agreed that this is a very vague message.
Jesse Seger
+1  A: 

You haven't by any chance registered your component on a mapped network drive have you? MSMQ runs in a different WinStation to the interactive WinStation. Network drives that are mapped in the interactive WinStation are not visible in other WinStations which could result in the symptom you described (component not found).

Paul Arnold
I did at first. But then I moved my project locally, registered it with VS, and completely recreated the trigger and rule. I still get the same event message.I've resorted to using a windows service to listen for messages rather than the messages triggering on component. Please see http://stackoverflow.com/questions/1521841/receiving-msmq-messages-with-windows-service.
Jesse Seger
A: 

Update!!!

I was messing around with this again. I created a simple EXE to fire when a message is received. It accepts 2 string parameters.

I forgot to pass the parameters the first time and I get the SAME error as I was discribing before. About the COM object not being found. I passed the parameters and it worked fine.

I thought I was passing the parameters to my COM object just fine, but maybe not. Maybe I'm doing something wrong. I will create a COM with no parameters and see if I can force the COM to invoke.

If anyone as examples of creating objects to accept parameters, please let me know.

Jesse Seger