Re: convert console app to config file?
From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 10/18/04
- Next message: hazz: "Re: convert console app to config file?"
- Previous message: hazz: "Re: convert console app to config file?"
- In reply to: hazz: "Re: convert console app to config file?"
- Next in thread: Ken Kolda: "Re: convert console app to config file?"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 18 Oct 2004 09:51:41 -0700
You can create a VS 2003 Solution that has two projects within in it - your
client project and your server project. Add a Applicaton Configuration file
to each project - app.config. Place the remoting configuration parameters
within the app.config file. Start your server application (console app most
likely) by right clicking on it and choosing Debug, Start Instance. Start
your client application next by right clicking on it and choosing Debug,
Step Into. You can find an example on my site,
http://www.SoftiTechture.com/discussions, regarding the factory pattern with
remoting.
Thanks,
Sam
-- _______________________________ Sam Santiago ssantiago@n0spam-SoftiTechture.com http://www.SoftiTechture.com _______________________________ "hazz" <hazz@sonic.net> wrote in message news:ev%23$vBTtEHA.3572@tk2msftngp13.phx.gbl... > Thank you Sam. > Actually I have an operational hurdle. > I created a working sample of a client and server in VS.NET using the code I > provided. > If I create the configuration file as you very helpfully morphed for me, how > do I activate the server object? In VS.NET I just had to click Start-F54 > and everything automagically happened. The console commands gave me instant > feedback the service was running. > If I use a config file....well how do I kick start the remoted object in > question.How do I know it's up and running and available for service? Sorry > for these I am sure painfully obvious questions. > Thanks again. I am getting closer! > hazz > "Sam Santiago" <ssantiago@n0spam-SoftiTechture.com> wrote in message > news:ubY30fStEHA.3200@TK2MSFTNGP14.phx.gbl... > > Yes, how about: > > > > <system.runtime.remoting> > > <application name="MyRemoteServer"> > > <service> > > <wellknown mode="SingleCall" > > type="Namespace.ServerClass, AssemblyName" > > objectUri="MyURI"> > > </service> > > <channels> > > <channel ref="tcp" port="8086"> > > <serverProviders> > > <formatter ref="binary" typeFilterLevel="Full" /> > > </serverProviders> > > </channel> > > </channels> > > </application> > > </system.runtime.remoting> > > > > The client side configuration file is left as an exercise for the reader > > ;-). > > > > Thanks, > > > > Sam > > > > -- > > _______________________________ > > Sam Santiago > > ssantiago@n0spam-SoftiTechture.com > > http://www.SoftiTechture.com > > _______________________________ > > "hazz" <hazz@sonic.net> wrote in message > > news:%233OkC5RtEHA.4044@TK2MSFTNGP09.phx.gbl... > > > The following code successfully turns an existing assembly into a server > > > object to which my client app successfully connects and invokes a method > > > from the server object. > > > > > > TcpServerChannel channel = new TcpServerChannel(8086); > > > ChannelServices.RegisterChannel(channel); > > > > > > RemotingConfiguration.RegisterWellKnownServiceType(typeof(ServerClass),"MyUr > > > i",WellKnownObjectMode.SingleCall) > > > > > > System.Console.WriteLine("hit to exit"); > > > System.Console.ReadLine(); > > > > > > Can I create a config file out of these few lines of code? > > > > > > thank you. -hazz > > > > > > > > > > > > > > > > > > > > > > > >
- Next message: hazz: "Re: convert console app to config file?"
- Previous message: hazz: "Re: convert console app to config file?"
- In reply to: hazz: "Re: convert console app to config file?"
- Next in thread: Ken Kolda: "Re: convert console app to config file?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|