HighTechTalks DotNet Forums  

Finding Dependencies from ServicedComponent

Dotnet Framework (Component Services) microsoft.public.dotnet.framework.component_services


Discuss Finding Dependencies from ServicedComponent in the Dotnet Framework (Component Services) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
AT
 
Posts: n/a

Default Finding Dependencies from ServicedComponent - 11-19-2004 , 03:53 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.dl l (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?

-Matt

Reply With Quote
  #2  
Old   
Brad King
 
Posts: n/a

Default Re: Finding Dependencies from ServicedComponent - 11-23-2004 , 11:29 AM






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.

"Matt Long" <matt.long (AT) matthew-long (DOT) com> wrote

Quote:
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.dl l (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?

-Matt



Reply With Quote
  #3  
Old   
Matt Long
 
Posts: n/a

Default Re: Finding Dependencies from ServicedComponent - 11-23-2004 , 03:33 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 ***
Don't just participate in USENET...get rewarded for it!

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.