Hi All
I am invoking a remote object through a code snippet provided by ingorammer to replace hardcoding of remote object path through configuration file. I have another .NET dll which is instantiating the remote object. This DLL is referenced in my windows client application. I call RemoteConfiguration.Configure in the main method. This means if i have 5 components hosted in IIS then Remote configuration will register the channel for each one of them as soon as the application is loaded
Is this a problem?? bcoz i am not using any of them at that point of time untill i access certain functionality. When are these registered channels released????? Secondly is this the right place to call Remote.Configuration. Can i register a channel on a need basis but without hardcoding the path in the code????? Please check the following example to understand my problem to provide me some suggestion
1. Client - Calls RemoteConfiguration.Configure in Mai
2. Config files contains all the interface types one for each business component
3. Interface DLL is referenced in client application
4. One presentation DLL per business component is used to instantiate the business component
5. In the constructor of this component, i call GetObject
Now What is the best place to call RemoteConfiguration.Configure???? Is it possible to call it inside a .NET DLL and have one config file per .NET DLL??? This way i wud register the channel only for the duration of the presentation DLL.
Please Help. Thanx in advance