Re: convert console app to config file?

From: Sam Santiago (ssantiago_at_n0spam-SoftiTechture.com)
Date: 10/18/04


Date: Mon, 18 Oct 2004 09:57:00 -0700

In that case, check out these links:

Read the Hosts section in this document:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/scalenetchapt11.asp?frame=true#scalenetchapt11_topic11

and check out these links:

How To: Host a Remote Object in a Windows Service
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT15.asp?frame=true

HOW TO: Host a Remote Object in Microsoft Internet Information Services
http://support.microsoft.com/default.aspx?scid=kb;en-us;312107

Thanks,

Sam

-- 
_______________________________
Sam Santiago
ssantiago@n0spam-SoftiTechture.com
http://www.SoftiTechture.com
_______________________________
"hazz" <hazz@sonic.net> wrote in message
news:emPa1GTtEHA.2192@TK2MSFTNGP14.phx.gbl...
> Actually Ken you guessed my dilemna. I was told by the "remoting resource"
> where I am working that all I have to do is add a config file to the
> existing codebase and presto, as long as I have MarshalByRefObj, then I am
> off and running.
> You are saying that I do indeed need a host application? Or host in IIS?
> Is the host application then what kickstarts the process? So the host
> application is either an .exe that one has to manually execute, or it
> becomes a service...or it is hosted in IIS in which case the client's call
> to a specific URI contained in the server's web config file launches the
> process?
> Thank you for seeing my confusion and asking the question.
> 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

  • Cannot connect to a remote object hosted in a window service
    ... when I host the remote object inside a windows application all seem to work ... but when I host the same object inside a windows service I get the following ... " connection attempt failed because the connected party did not properly ...
    (microsoft.public.dotnet.languages.csharp)
  • Cannot connect to a remote object hosted in a window service
    ... when I host the remote object inside a windows application all seem to work ... but when I host the same object inside a windows service I get the following ... " connection attempt failed because the connected party did not properly ...
    (microsoft.public.dotnet.framework.remoting)
  • Can I control the time which the framework throws the System.Net.Sockets.SocketException?
    ... I'm using a .exe to to host a remote object ... When trying to call the remote object from a client ... I want it to be thrown after ...
    (microsoft.public.dotnet.framework.remoting)
  • remoting hosts
    ... I also know that I can write my own application to host the remote object ... (windoes service or other application - again, ... remote object or do I still need to use IIS or a custom host? ...
    (microsoft.public.dotnet.framework.remoting)
  • 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)