Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Component Services / October 2004

Tip: Looking for answers? Try searching our database.

MSMQ Trigger & .Net C# configuration file for COM interop

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Sandwick - 27 Oct 2004 22:33 GMT
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

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.