Re: convert console app to config file?

From: hazz (hazz_at_sonic.net)
Date: 10/18/04


Date: Mon, 18 Oct 2004 10:54:31 -0600

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: Installing several instances of an app as services
    ... There would be one config file, ... and process to copy that database. ... > at the moment i am developing an app which is sort of an interface to copy ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: convert console app to config file?
    ... You are saying that I do indeed need a host application? ... Or host in IIS? ... to a specific URI contained in the server's web config file launches the ...
    (microsoft.public.dotnet.framework.remoting)
  • Re: App wont run when adding appSettings to config file
    ... an app config file which also had an appSettings element in it. ...
    (microsoft.public.dotnet.general)
  • Re: External Config Files
    ... I got tired of dinking with the config stuff in VS, ... If you want the users to share a config file, put it on a network drive, ... put the data in a database (which is a good idea, ... I actually add another folder for the name of my app to that path, ...
    (microsoft.public.dotnet.framework)
  • App wont run when adding appSettings to config file
    ... I'm running a wpf windows app and want to add the appSettings element to the ... the app will run when the config file looks like this: ...
    (microsoft.public.dotnet.general)