Windows-service remoting - IPC vs. COM

dotnet framework


  • 1. getting MSPRess ".NET Remoing" LoadBalancingCLient delegates to work
    Hi All, recently I bought MSPress's .NET Remoting, in CHapter 5, the LoadBalancingClient/Server sample code, the client's delegate doesn't seem to work (in that the Server's event handler is always NULL). I've gotten the delegate to propogate to the server using some tricks (i.e., to set the server's variable correctly) but get an exception: JobEvent Exception : System.Runtime.Remoting.RemotingException: This remoting pr oxy has no channel sink which means either the server has no registered server c hannels that are listening, or this application has no suitable client channel t o talk to the server. at System.Runtime.Remoting.Proxies.RemotingProxy.InternalInvoke(IMethodCallMe ssage reqMcmMsg, Boolean useDispatchMessage, Int32 callType) at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke(IMessage reqMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgDa ta, Int32 type) at LoadBalancing.JobEventHandler.BeginInvoke(Object sender, JobEventArgs args , AsyncCallback callback, Object object) at LoadBalancing.LoadBalancingJobServerImpl.NotifyClients(JobEventArgs args) in e:\download\dot_net_remoting\chapter 5\loadbalancingremoteobject\jobserverimp l.cs:line 102 Has anyone gotten this to work at all? or clues as to what this means? Using .NET 1.0 SP 2 , VS NET 1.0 , C# THanks Marteen
  • 2. Possible memory leak in singleton object hosted in window service
    Raghu Check my post "Memory problem using SOAP over HTTP, Help!!" of Jan 20, 2003 Are we seeing two instances of the same problem Nei
  • 3. custom proxy controling lifetime
    Hi. I'm trying to implement a scheme, where my own Proxy class (the descendant of RealProxy) participates in controling the object's lifetime. To be more precise: 1. My server objects are descendants of ContextBoundObject 2. They are marked with an attribute that is inherited from ProxyAttribute 3. My Attribute overrides CreateProxy method where it creates and returns an object of type MyProxy - a descendant of RealProxy. 4. At the time of proxy creation I want to register a sponsor for the object the proxy is bound to. But I can't call ((MarshalByRefObject)GetTranparentProxy()).GetLifeTimeService() neither in constructor nor in CreateProxy method (The call leads to exception. I assume that it is because the identity object is not set to proxy at that time). Can anybody suggest any workarounds or solutions to solve this problem? Thanx in advance, Stas Shidlovsky.

Windows-service remoting - IPC vs. COM

Postby thebig » Sun, 12 Nov 2006 01:42:28 GMT


i am developing a windows service in C# with the .NET framework 2.0
which must be configured by different applications (VB 6.0 and C#).

I need one single object which should be used (how its made by the
IPC-remoting-mechanism). But it seems to me that i can't use the
IPC-channel mechanism for the VB 6.0 applications. So i wanna use a COM
component in VB 6.0. I think i can use a COM wrapper to use the
IPC-mechanism under VB 6.0, but it would be better to use only one
technique (so i guess this must be COM).

But can i do the same things with com as with IPC ? Can i use one
single object for all applications? And can i use event-handling like
with IPC-remoting?

Thank you for your information.

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?


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?


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

In the service itself, during the 'Start' operation:

Dim channel As TcpChannel = New TcpChannel(CInt(MySettings.Channel))
ChannelServices.RegisterChannel(channel, False)
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)),

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?


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 
(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!

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

Return to dotnet framework


Who is online

Users browsing this forum: No registered users and 81 guest