问题
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?
回答1:
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).
回答2:
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.
回答3:
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.
来源:https://stackoverflow.com/questions/1473179/msmq-not-invoking-com