all groups > dotnet remoting > october 2007 >
You're in the

dotnet remoting

group:

Hosting Remote objects in Windows Service


Hosting Remote objects in Windows Service William
10/13/2007 10:55:53 PM
dotnet remoting:
Hey

We've currently have a remoting objects that are being hosted by a Windows
Service. The Windows Service gets the names and port to host the objects on
from a config file. The Server Components being hosted, then retrieve the
connection string for the database to connect to from the Server.config
file.
This works quite well so far. However, we now have two customers who want
to share a server (use 2 databases). This can easily be done by using two
console hosts, each with it's own copy of the server components and with
it's own config file containing a connection string and hosting the
components on a different port (it can even be different versions of the
server components).

However, is it possible to do this using one Windows Service?
I tried it by trying to specify another folder for the second set, but I get
an error because the 2nd set of components weren't in the same folder as the
service executable (could not be found). I also have trouble installing
the service twice because the name of the Windows service already exists.

Any idees on how to do this?

Re: Hosting Remote objects in Windows Service Spam Catcher
10/15/2007 2:12:27 PM
"William" <van_diesel@bigfoot.com> wrote in
news:ubNQztdDIHA.1164@TK2MSFTNGP02.phx.gbl:

[quoted text, click to view]


Ideally of course... your service will handle multiple
connections/database, but if that is not possible, the easiest solution is
to install 2 copies of the service.

Each Window Service needs a unique name - so to install 2 copies of a
windows service, you'll need to change the service name.

The most straightforward way is to change your Service Installer file with
a new service name.

You can also Google for alternative methods - you maybe able to manually
register the service under a different name without changing the service
installer file.
Re: Hosting Remote objects in Windows Service William
10/16/2007 10:39:37 PM
Hi

Thanks. I thought that is what I'll have to do...

I was just hoping for maybe a solution where I can host two sets of
components from different folders in one service.




[quoted text, click to view]

AddThis Social Bookmark Button