Groups | Blog | Home
all groups > dotnet component services > november 2004 >

dotnet component services : Finding Dependencies from ServicedComponent


matt.long NO[at]SPAM matthew-long.com
11/19/2004 1:53:25 PM
I have a COM+ component that accomplishes the following:

1. Unzips a zip file into a temp directory
2. Parses a raw text file from the zip and converts it to XML
3. Bulk loads the XML into a database
4. Runs several stored procedures
5. Cleans up all of the temp files

This is all accomplished by calling a VBScript that instatiates my
serviced component (written in C#) which depends on the following
assemblies:

Zip and Unzip Capabilities - ICSharpCode.SharpZipLib.dll (stright
..NET)
XML Bulk Loading - Interop.SQLXMLBULKLOADLib.dll (this was
generated with tlbimp.exe with a snk file on xblkld3.dll--.NET wrapper
for a COM component)
Serviced Component - Software4.TransAn.DataImport.dll
Raw Data Parser (EZSCan) -
Software4.TransAn.DataImport.Drivers.EZScan.dll (stright .NET)
Raw Data Parser (ScanMaster) -
Software4.TransAn.DataImport.Drivers.ScanMaster.dll (straight .NET)

The two data parsers are never used at the same time and they are
loaded at runtime using reflection.

I am having trouble understanding how things work between the
different technologies represented here. My serviced component is
written in C#, however, it accesses other assemblies that are straight
..NET. But it also accesses assemblies such as the bulk loader that are
just COM components. I have yet to get this to work and I believe this
has to do with the fact that I don't know exactly where each object is
looking to find the assemblies it depends on.

When I run my VBScript, it just looks in component services to get the
object it needs, but from there, how can I access the other assemblies
I am dependant on. I don't want to put them into the GAC because they
are not shared components, so how do I make them available to my
serviced component?

Brad King
11/23/2004 12:29:55 PM
Is your COM+ package a server package or library package ? This makes a
difference how you have to deploy .Net dependencies.

Server package: Your assembly runs in the process of dllhost.exe, so
everything pretty much has to go in the GAC.

Library package: Your assembly runs in the process of the VB Script host you
are using, so ALL of your .Net dependencies either need to be in the GAC or
in the same directory as the script host exe. This includes any wrappers for
COM components you mentioned.

Hope this helps.

[quoted text, click to view]

Matt Long
11/23/2004 1:33:01 PM
Actually, yes. That's very helpful. I finally got it working!! I really
appreciate it.

Thanks.

-Matt

*** Sent via Developersdex http://www.developersdex.com ***
AddThis Social Bookmark Button