Help! How do I Specify .config Information if my Assembly Client is a VB6 Application?

  • Thread starter Thread starter Joseph Geretz
  • Start date Start date
J

Joseph Geretz

I need to download a greater than 4 megabyte attachment via WSE / DIME. The
only way I know how to configure this is via a .config file. Normally, the
..config file is the same name as the base application. I built a .NET driver
program to test this, NetBrokerDriver and provided a
NetBrokerDriver.exe.config file which specifies the following:

<messaging>
<maxRequestLength>-1</maxRequestLength>
</messaging>

This works. My .NET client application is able to transfer large files
(tested up to 100 megabytes).

HOWEVER, my live scenario is very different since it includes VB6 and
interop. Will I be able to use a .config file in this scenario?

My application is deployed as C:\Program Files\MyApp\MyApp.exe

My application DLL's are all deployed to C:\Program Files\Common
Files\MyCompany. I'd like to place the .NET dll in this location as well for
consistency and I'll use RegAsm /codebase in order to register this in this
location.

So where do I place this .config file and how do I name it?

C:\Program Files\MyApp\MyApp.exe.config?
C:\Program Files\MyApp\MyNETDLL.dll.config?
C:\Program Files\Common Files\MyCompany\MyNETDLL.dll.config?
C:\Program Files\Common Files\MyCompany\MyApp.exe.config?

Otherwise, if this is not possible for an Interop scenario, please tell me
how I can set this value directly in code, without having to resort to the
..config file.

Thank you very much for your help!

- Joe Geretz -
 
Solution!

This is not a problem. Evidently, .NET Assembly loaded via Interop takes on
the AppDomain identity of the base VB6 application. So placing a .config
file named MyVB6App.exe.config together with MyVB6App.exe in the application
folder does the trick!

- Joe Geretz -
 
Back
Top