Esempio n. 1
0
        static int Main(string[] args)
        {
            var s   = Properties.Settings.Default;
            var dir = Path.GetFullPath(args.Length == 0 ? s.WebRoot : args[0]);

            if (File.Exists(Path.Combine(dir, "web.config")))
            {
                //if (File.Exists(Path.Combine(Path.Combine(dir, "bin"), "IronScheme.Web.Runtime.dll")))
                if (File.Exists(new [] { dir, "bin", "IronScheme.Web.Runtime.dll" }.Aggregate(Path.Combine)))
                {
                    var ctl = new HttpListenerController(
                        new string[] { string.Format("http://{0}:{1}/", s.IP, s.Port) },
                        "/", dir + @"\");

                    ctl.Start();

                    Console.WriteLine("Ctrl-C to stop");
                    Console.ReadLine();
                    //Environment.Exit(0); // wierd, not really  :)
                    return(0);
                }
                else
                {
                    Console.Error.WriteLine("IronScheme not properly installed. This is normal on Windows XP, follow the instructions in the docs/webserver-xp.txt");
                    return(2);
                }
            }
            else
            {
                Console.Error.WriteLine("Not a web directory: {0}", dir);
                return(1);
            }
        }
        public aspnet_server_context()
        {
            SelectPort();

            _http = new HttpListenerController(new[] { "http://+:" + _port + "/" }, "/", FileCopySetup.TempFolder.FullName);
            _http.Start();
        }
Esempio n. 3
0
    static void Main(string[] args)
    {
        HttpListenerController _controller = null;

        string[] prefixes = new string[] {
                "http://localhost:8081/",
                "http://127.0.0.1:8081/"
        };
        string curDir = System.Environment.CurrentDirectory;
        string vdir = "/";
        string pdir = curDir; ;

        _controller = new HttpListenerController(prefixes, vdir, pdir);
        _controller.Start();

        IStateName proxy = XmlRpcProxyGen.Create<IStateName>();
        (proxy as XmlRpcClientProtocol).Url = "http://127.0.0.1:8081/statename.rem";
        string name = proxy.GetStateName(1);
        _controller.Stop();
    }
Esempio n. 4
0
    static void Main(string[] args)
    {
        HttpListenerController _controller = null;

        string[] prefixes = new string[] {
            "http://localhost:8081/",
            "http://127.0.0.1:8081/"
        };
        string curDir = System.Environment.CurrentDirectory;
        string vdir   = "/";
        string pdir   = curDir;;

        _controller = new HttpListenerController(prefixes, vdir, pdir);
        _controller.Start();


        IStateName proxy = XmlRpcProxyGen.Create <IStateName>();

        (proxy as XmlRpcClientProtocol).Url = "http://127.0.0.1:8081/statename.rem";
        string name = proxy.GetStateName(1);

        _controller.Stop();
    }
 public void Setup()
 {
     _controller = new HttpListenerController(prefixes, vdir, pdir);
       _controller.Start();
 }
 public void ConfigureServer(Action configuration)
 {
     _http = new HttpListenerController
                 (new[] { "http://127.0.0.1:" + _port + "/" }, "/", TempFolder.FullName);
     _http.Start(configuration);
 }
Esempio n. 7
0
 public void Setup()
 {
     _controller = new HttpListenerController(prefixes, vdir, pdir);
     _controller.Start();
 }