Click here to Skip to main content
11,496,146 members (666 online)
Click here to Skip to main content
Add your own
alternative version

.NET Remoting and Cross Domain Marshalling

, 10 Apr 2006 CPOL 61.2K 1.1K 58
An article about how to marshal a remote client request from one AppDomain to another.
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
using System;
using System.Collections.Generic;
using System.Text;

namespace SeparateDomainRemoting
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                string url = "tcp://localhost:1234/PrintService.rem";
                IPrintService service = (IPrintService)Activator.GetObject(typeof(IPrintService), url);

                service.PrintMessage("Hello World to PrintService at 1234");

                Console.WriteLine("Press ENTER to exit ...");
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    }
}

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

Wytek Szymanski
Web Developer
United States United States
I am a consultant, trainer, software archtect/engineer, since the early 1980s, working in the greater area of Boston, MA, USA.

My work comprises the entire spectrum of software, shrink-wrapped applications, IT client-server, systems and protocol related work, compilers and operating systems, and more ....

I am currently focused on platform development for distributed computing in service oriented data centers.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150520.1 | Last Updated 10 Apr 2006
Article Copyright 2006 by Wytek Szymanski
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid