Click here to Skip to main content
Click here to Skip to main content

Remoting Compression Channel Sink

By , 12 Nov 2008
 
using System;
using System.Collections;
using System.Runtime.Remoting.Channels.Http;
using System.Runtime.Remoting.Channels.Tcp;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting;
using System.Runtime.Serialization.Formatters;
using Business;
using Util;

namespace Server
{
    class Program
    {
        static void Main(string[] args)
        {
            RemotingConfiguration.Configure(@"..\..\server.config", false);
            foreach (HttpChannel channel in ChannelServices.RegisteredChannels)
            {
                string[] urls = channel.GetUrlsForUri("BusinessManager.rem");
                if (urls.Length > 0)
                {
                    string objectUrl = urls[0];
                    string objectUri;
                    string channelUri = channel.Parse(objectUrl, out objectUri);
                    Console.WriteLine("The object URL is {0}.", objectUrl);
                    Console.WriteLine("The object URI is {0}.", objectUri);
                    Console.WriteLine("The channel URI is {0}.", channelUri);
                }
            }

            Console.WriteLine("Press ENTER to exit the server.");
            Console.ReadLine();
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of use 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)

About the Author

aschmidt
United States United States
Member
Alexander Schmidt. I'm a software developer, who is working primarily with Microsoft technologies including Microsoft .NET. I'm also interested in optimization problems and software engineering in general. You can visit my blog at http://www.alexschmidt.net

Permalink | Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 13 Nov 2008
Article Copyright 2008 by aschmidt
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid