Since remoting configuration can be in any file you have access to (it doesn't
need to be in an application configuration file), the easiest thing to do is
just put the config file in the same directory the assembly is installed in, and
then pass the path to that file to RemotingConfiguration.Configure.

You can call Assembly.GetExecutingAssembly().Location from within your assembly
to determine what directory that is, and then just append the name of your
config file.  Something like:

using System.IO;
using System.Reflection;

string configFile =
  Path.Combine( Assemby.GetExecutingAssembly().Location,
                "yourassembly.dll.config" );

RemotingConfiguration.Configure(configFile);

-Mike
http://www.bearcanyon.com
 

> 
> -----Original Message-----
> From: Moderated discussion of advanced .NET topics. 
> [mailto:[EMAIL PROTECTED] On Behalf Of Bill Bassler
> Sent: Tuesday, October 07, 2003 5:24 AM
> To: [EMAIL PROTECTED]
> 
> I have a component running in a COM+ 1.1 application on 
> Windows 2000 using
> Server activation. I need the component to be able to 
> retrieve remoting
> info from a .config file
> 
> e.g.
> <configuration>
>  <system.runtime.remoting>
>   <application>
>    <client>
>     <wellknown
> type="MyCompany.Configuration.Shared.ConfigRO, ConfigBroker"
> 
> url="http://web1.mycompany/ConfigServer.soap"; />
>    </client>
>   </application>
>  </system.runtime.remoting>
> </configuration>
> 
> 
> The only way I've found to make this work is place a file named
> dllhost.exe.config
> 
> in the system32 directory which is the dll hosting location 
> for 1.1.  I
> believe in COM+ 1.5 I can specify the run location. In COM+ 
> 1.1 I don't
> believe I can specifiy a run location.
> 
> Question:  This seems like quite a hack.  Is there a better solution?
> 
> ===================================
> This list is hosted by DevelopMentorR  http://www.develop.com
> NEW! ASP.NET courses you may be interested in:
> 
> 2 Days of ASP.NET, 29 Sept 2003, in Redmond
> http://www.develop.com/courses/2daspdotnet
> 
> Guerrilla ASP.NET, 13 Oct 2003, in Boston
> http://www.develop.com/courses/gaspdotnet
> 
> View archives and manage your subscription(s) at 
> http://discuss.develop.com
> 

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
NEW! ASP.NET courses you may be interested in:

2 Days of ASP.NET, 29 Sept 2003, in Redmond
http://www.develop.com/courses/2daspdotnet

Guerrilla ASP.NET, 13 Oct 2003, in Boston
http://www.develop.com/courses/gaspdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to