All pastes #11594 Raw Edit

Mine

public text v1 · immutable
#11594 ·published 2005-05-12 16:41 UTC
rendered paste body
// Compile as: mcs prog.cs -r:System.Runtime.Remoting

using System;
using System.IO;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;
//using System.Runtime.Remoting.Dll;

class MainClass
{
	public static void Main(string[] args)
	{
		Console.WriteLine("Hello World!");
		ChannelServices.RegisterChannel(new HttpChannel(8080));
		RemotingConfiguration.RegisterWellKnownServiceType(typeof(DirectoryLister), 
				"dir", WellKnownObjectMode.Singleton);
		
		Console.WriteLine("Press Enter to exit");
		Console.ReadLine();
	}
}

public class DirectoryLister : MarshalByRefObject 
{
	public string [] ListDirectory(string path)
	{
		return Directory.GetFileSystemEntries(path);
	}
}