Similar Threads:
1.IPC Remoting In a Windows Service
Hi, I have created a Windows Service which uses IPC Remoting to share data
with a VB.Net application. The service process runs in the LocalSystem
Account. When the the client VB app attempts to access data from the shared
class, I get the following error:
"Failed to connect to IPC Port. Access is denied."
Initialy, I developed & debuged the Windows Service code in a VB.Net
Windows application and all worked fine. Is there some security issue I need
to contend with when running as a LocalSystem service?
RML
2.Windows Service to Windows Service Remoting
Hi all,
I am creating two windows services, named Service1 and Service2. I am
planning on exposing some objects over remoting from both of the windows
services. Lets say Service1 exposes objects from Library1 and Service2
exposes objects from Library2. Components from Library1 will be creating
components from Library2 over remoting! Both windows services are separated
by a firewall (assume that ports required for communication have been opened)
Now I have following questions:
(1) Is that possible for a remoting server (such as Service1 and Service2 in
this case) to act both as a remoting server and also remoting client?
(2) If so, how do we manage connections, channels etc in config files?
(3) Any potential problems in this architecture?
Thanks,
Mansoor
3.Remoting 'registration' in a Windows Service (VS 2005)
I have a Windows Service (in VB.NET 2005) - This service has a timer
that fires every xx seconds, and basically checkes a database table,
and if there are new records there, it processes them.
However, I wanted to provide some kind of GUI service control program
so that I could start/stop/etc the service from either the same server
or another computer on the intranet. Along with just being able to
start/stop the service, I wanted to also allow the modification of some
of the service settings - such as the amount of seconds for the timer
to fire, etc etc.
So I wrote a GUI app (with a service controller) that uses remoting to
talk to the actual service on the server. In this GUI, the service
controller component is used to control the service itself, and the
remoting to modify any internal service parameters. I do the calls as
such:
In the service itself, during the 'Start' operation:
Dim channel As TcpChannel = New TcpChannel(CInt(MySettings.Channel))
ChannelServices.RegisterChannel(channel, False)
RemotingConfiguration.RegisterWellKnownServiceType(GetType(ServiceInfoCl
ass.Info), "ServiceInfo", WellKnownObjectMode.Singleton)
RemotingServices.Marshal(ServiceInfo, "ServiceInfo")
And in the GUI controller app:
If ChannelServices.RegisteredChannels.Length = 0 Then
ChannelServices.RegisterChannel(chan, False)
MyStatus = CType(Activator.GetObject(GetType(ServiceInfoClass.Info),
String.Format("tcp://{0}:{1}/ServiceInfo", server, Port)),
ServiceInfoClass.Info)
I use a separate Class (ServiceInfo) that 'stores' the actual
parameters and use that to transfer the settings back and forth between
the service and the GUI controller app.
Now my question: How often do I have to 'register' my remote connection
- both in the service itself and in the GUI controller? I.E. Do I just
have to do this once (in the service Start method, and whenever the GUI
starts up)? Or do I need to re-register the remote stuff every time the
timer fires? The reason I am asking is that it seems that sometimes I
get 'bogus' or invalid information coming back from the service to the
GUI app. For instance, if I stop and then start the service from the
GUI it seems to return the info properly; however, if I start the GUI
and the service has been running for awhile (or I start the GUI and let
it sit there a bit) it seems that the info coming back is 'old' or
invalid. So one thought I am having is that I need to reestablish the
remote connection (and the info class) every time the timer fires.
Should one just need to establish this remote connection one time? Or
should it be re-done every timer tick?
Tom
--
4.Dymamically create IPC channels in windows service application(newbie)
5.HELP: Dymamically create IPC channels in windows service application(newbie)
Hi, experts:
I am writing a windows service application in C# which will dynamically
create IPC channels upon receiving client requests(both service and clients
running on the same machine, so I choose IPC instead of TCP or HTTP).
following are my questions:
(1)How do I dynamically get free PORT from the system?
(2)after I get the PORT and register the IpcChannel, how to let my client
know the PORT number, so it can register the IpcChannel with right port
correspondingly?
(3)if both server and client register IpcChannel correctly, server will
expose some interface methods for client to call. How do client set an
asynchronous callback in the channel to receive response from server?
Your help is highly appreciated!
Hank
6. WINDOWS SERVICE IPC Channel and a Form GUI
7. IPC channel raise exception after windows service installation
8. IPC between application and windows service