Click here to Skip to main content
Click here to Skip to main content
Articles » Languages » C# » Beginners » Downloads
 
Add your own
alternative version
Go to top

Dot Remoting - Server Activated, SingleCall Technique

, 11 Jan 2011
Shows how you can create remote objects and access it from client. Here, it is server activated single call technique
RemotingEx01.zip
ConServer
ConServer
bin
Debug
ConServer.exe
ConServer.vshost.exe
ClassDiagram1.cd
Properties
RemClient
RemClient
bin
Debug
ConServer.exe
RemClient.exe
RemClient.vshost.exe
Properties
Settings.settings
using System;
using System.Collections.Generic;
using System.Text;

//RemoteServer_001: Required Assemblies
using System.Runtime;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;

namespace ConServer
{
    class Program
    {
        static void Main(string[] args)
        {
            //RemoteServer_002: Create a communication channel (Server) and register it
            TcpServerChannel SrvrChnl = new TcpServerChannel(13340);
            ChannelServices.RegisterChannel(SrvrChnl, false); 

            //RemoteServer_009: Register the Remote Class so that the Object can go 
            //and sit on the Remote pool
            RemotingConfiguration.RegisterWellKnownServiceType(typeof(ConServer.RemCustomer), "RemCustomer", WellKnownObjectMode.SingleCall);

            //RemoteServer_010: Halt the server so that Remote client can access the object
            Console.WriteLine("Server is Running...");
            Console.WriteLine("Press Any key to halt the Server");
            Console.ReadKey();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sivaraman Dhamodharan
Software Developer iSOFT
India India
I am working as software engineer in iSOFT R&D. I have been come accross C++,MFC, .net technologies. I do like playing video games, reading books.
 

Web: www.mstecharticles.com


| Advertise | Privacy | Mobile
Web03 | 2.8.140916.1 | Last Updated 12 Jan 2011
Article Copyright 2011 by Sivaraman Dhamodharan
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid