I am trying to get my C# object to be invoked by MSMQ triggers. I
have the COM Callable Wrapper, and made my assembly strongly typed.
It works when all I have is a simple dump of the MSMQ body text into a
text file.
But when I try to add some code that uses classes that I've included
in a reference (also strongly named), it fails. My theory is that it
is unable to load config file settings. I'm not sure where this
assembly is going to try to look for a config file. WHen using COM
interop & MSMQ triggers, where should I place the config file, and
what should the config file be named? I know for .Net apps, it's
usually the web.config or app.exe.config. But since triggers is the
launching point and it is not .Net, not sure how to set up the
configuration file.
Thanks,
Mike Sandwick
Eugene Shvets [MSFT] - 28 Oct 2004 00:06 GMT
See if the following helps (I pasted two last messages in a discussion you
can find at http://www.dotnet247.com/247reference/msgs/13/68422.aspx) :
"Another Issue: When MSMQ Trigger lauched my console program, the
Environment.CurrentDirectory pointed Winnt\System32 instead of the
Assembly's location. Anyone can help on this? I need to need access a xml
doc in the same location as the assembly.
Or is there any way we could implemented custom Application setting as it VB
GetSetting, SetSetting or WinAPI - GetPrivateProfile() in C#?
Reply:
System.Configuration namespace -> ConfigurationSetttings.AppSettings["xxx"]
will do the job"
HTH,
Eugene
>I am trying to get my C# object to be invoked by MSMQ triggers. I
> have the COM Callable Wrapper, and made my assembly strongly typed.
[quoted text clipped - 13 lines]
> Thanks,
> Mike Sandwick
Mike Sandwick - 28 Oct 2004 18:03 GMT
Thanks, this helps. I found the directory where the trigger service
(mqtgsvc.exe), and created the mqtgsvc.exe.config file, and all is well
now.
Thanks,
Mike