is it possible to send data from remote object to the server in C# remoting using TCP channel????
Please reply
thanking you in advance....................
is it possible to send data from remote object to the server in C# remoting using TCP channel????
Please reply
thanking you in advance....................
For — short, practical summary plus pointers.
Yes. .NET Remoting can send data over a TCP channel (clients call server methods) and can also support server-to-client callbacks by passing a MarshalByRefObject reference and having the client open a listening TcpChannel. That pattern is the classic Remoting approach (server-activated or client-activated objects + TcpChannel). (learn.microsoft.com)
Practical notes (common pitfalls you’ll hit):
ChannelServices.RegisterChannel(new TcpChannel(0), false); // client listens on any free port
public override object InitializeLifetimeService() => null; // demo only — controls lease See the remoting/lease details and the BinaryFormatter security guidance. (learn.microsoft.com)
About WCF (as suggested): WCF’s netTcpBinding supports duplex contracts (server callbacks) and is generally a cleaner, better-supported way to implement two‑way TCP-style communication. WCF services may be self-hosted inside a managed app (WinForms, console) or run as a Windows Service if you need a background host. If the app is on .NET Framework, WCF is the usual migration path from Remoting. (learn.microsoft.com)
Important decision factor: .NET Remoting is legacy and effectively obsoleted for modern .NET (it’s not supported on .NET 5+), so prefer WCF (Framework) or modern alternatives (gRPC / SignalR / REST) for new work. Use Remoting only for maintenance on an existing .NET Framework deployment and pay close attention to security (serialization, ports, firewall/NAT). (learn.microsoft.com)
Summary for the thread: Remoting + TcpChannel can do it (including callbacks) but requires careful lease/port and security handling; WCF duplex or a modern stack is a safer choice for new projects.
ya..with the help of WCF..it is possible...
refer above link ..
Is it Possible with C# Windows Forms Application in Visual Studio
ya..with the help of Windows Service..u can make the WCF(Windows Service) 4 desktop application..
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.