using System;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

public class Server
    public static void Main(string[] args)
        // Create the server channel.
        HttpServerChannel serverChannel = new HttpServerChannel(9090);

        // Register the server channel.

        // Expose an object for remote calls.
            typeof(RemoteObject), "RemoteObject.rem",

        // Wait for the user prompt.
        Console.WriteLine("Press ENTER to exit the server.");
        Console.WriteLine("The server is exiting.");

for this i am getting this error what should i do

Error 1 The type or namespace name 'Http' does not exist in the namespace 'System.Runtime.Remoting.Channels' (are you missing an assembly reference?) C:\Documents and Settings\praktykant\Moje dokumenty\Visual Studio 2005\Projects\ConsoleApplication4\ConsoleApplication4\Program.cs 5 40 ConsoleApplication4

Hi there Jacobpauls and welcome to DaniWeb :). To solve your problem try right clicking the icon of your project (in solution browser) and select add reference. Then select System.Runtime.Remoting. Its under the .net tab of the add references form. The "using" statements are merely a convenience to eliminate typing long
namespace strings, they do not pull in all of the requisite assemblies. Hope this helps and fixes your problem!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.