Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Remoting / January 2004

Tip: Looking for answers? Try searching our database.

Use of Config Files

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Binney - 23 Jan 2004 14:58 GMT
My application implements CAO with a SAO factory.  I would like to switch my code over to using config files to allow for settings changes without re-comple

The server can reside on any machine in the users lan.  The location (machine name) of the server is passed to the client when the client is loaded.

What is the be way to use config files in this scenario?

Here is my client and server code:

Server:
IDictionary prop = new Hashtable();

prop["port"] = 336;

prop["machineName"] = System.Environment.MachineName;

TcpChannel tchannel = new TcpChannel(prop, null, null);

ChannelServices.RegisterChannel(tchannel);

RemotingConfiguration.RegisterWellKnownServiceType(

typeof(Broker),

"VistaServer.Broker",

WellKnownObjectMode.Singleton);

CLient

TcpChannel tcpChannel = new TcpChannel();

ChannelServices.RegisterChannel(tcpChannel);

//Server url is passed in when the client runs

string url = "tcp://" + serverUrl + ":336/VistaServer.Broker";

iBroker = (IBroker)Activator.GetObject( typeof(IBroker), url);

s_IRemote = iBroker.CreateRemoteSystem(null);

s_IRemote.InitializeSystem();
Allen Anderson - 26 Jan 2004 17:27 GMT
well, you can't really class factory a CAO with an SAO through config
files.  You can get all the way up to the point where you create your
SAO through the configs, but you will still have to hand create the
CAO and return it back from the SAO.

Allen Anderson
http://www.glacialcomponents.com
mailto: allen@put my website url here.com

>My application implements CAO with a SAO factory.  I would like to switch my code over to using config files to allow for settings changes without re-comple
>
[quoted text clipped - 38 lines]
>
>s_IRemote.InitializeSystem();

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.