Re: convert console app to config file?

From: Ken Kolda (ken.kolda_at_elliemae-nospamplease.com)
Date: 10/18/04


Date: Mon, 18 Oct 2004 11:24:19 -0700

If you place your remoting configuration information in a config file, then
you must call RemotingConfiguration.Config() as you have it in order to have
that info parsed and used. The one exception is if you host your object
under IIS. In that case, the remoting information goes in your web.config
and will be automatically read when the web app is start by IIS.

Ken

"hazz" <hazz@sonic.net> wrote in message
news:%23%234hlMTtEHA.2192@TK2MSFTNGP14.phx.gbl...
> Is this the magic line I need for the host application whether it be a
> Windows form app, a service, a console app, et?
>
> RemotingConfiguration.Configure("Listener.exe.config");
>
> hazz
>
> "Ken Kolda" <ken.kolda@elliemae-nospamplease.com> wrote in message
> news:uzGw2mStEHA.160@TK2MSFTNGP11.phx.gbl...
> > I'm not 100% sure of what you're asking. The configuration performed by
> the
> > first three lines could certainly be placed in a config file, e.g.
> >
> > <configuration>
> > <system.runtime.remoting>
> > <application>
> > <channels>
> > <channel ref="tcp" port="8086" />
> > </channels>
> > <server>
> > <wellknown mode="SingleCall" type="ServerClass, ServerAssembly"
> > objectUri="MyUri" />
> > </server>
> > </application>
> > </system.runtime.remoting>
> > </configuration>
> >
> > The last two, of course, could not -- they are application code and not
> > configuration. Are you asking if it's possible to use an assembly as a
> > remote object without writing a host application and simply using a
config
> > file? If so, the answer is no, although you can achieve essentialy
> something
> > like this by using IIS as your host (i.e. this would mean you wouldn't
> have
> > to write your own host app).
> >
> > Ken
> >
> >
> > "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
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: DLL settings in Application settings file
    ... several different apps, one a web app, another a windows app, another a ... various things from the host application. ... of the configuration of the class library that the host application does not ... Dim sectGroup As ApplicationSettingsGroup ...
    (microsoft.public.dotnet.languages.vb)
  • Re: convert console app to config file?
    ... Windows form app, a service, a console app, et? ... > first three lines could certainly be placed in a config file, ... > remote object without writing a host application and simply using a config ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: convert console app to config file?
    ... The configuration performed by the ... first three lines could certainly be placed in a config file, ... like this by using IIS as your host (i.e. this would mean you wouldn't have ... > from the server object. ...
    (microsoft.public.dotnet.framework.remoting)
  • Sharing Config File Between Processes
    ... Is there any way to specify the location of the config file that I want the ... I have multiple processes that work together and share most of ... looked at the Configuration App Block, and that is both too complex and too ...
    (microsoft.public.dotnet.framework)
  • Re: Web.Config AppSettings & Caching
    ... Can all users settings be changed without the app restarting? ... Microsoft *has* modified the configuration model between versions ... The only difference here between your database solution and your ...
    (microsoft.public.dotnet.framework.aspnet)