[Microsoft.Build] Ignore ThreadAbortException in BuildNodeManager
[mono-project.git] / mono / tests / bug-80307.cs
blob06c51b2d7a7f5357afea26074ec5d8701349857a
1 using System;
2 using System.IO;
3 using System.Web;
4 using System.Web.Hosting;
6 class TinyHost : MarshalByRefObject
8 public static TinyHost CreateHost ()
10 string path = Directory.GetCurrentDirectory ();
11 string bin = Path.Combine (path, "bin");
12 string asm = Path.GetFileName (typeof (TinyHost).Assembly.Location);
14 Directory.CreateDirectory (bin);
15 File.Copy (asm, Path.Combine (bin, asm), true);
17 return (TinyHost) ApplicationHost.CreateApplicationHost (
18 typeof (TinyHost), "/", path);
22 public void Execute (string page)
24 SimpleWorkerRequest req = new SimpleWorkerRequest (
25 page, "", Console.Out);
26 HttpRuntime.ProcessRequest (req);
29 static void Main ()
31 TinyHost h = CreateHost ();
32 StreamWriter w = new StreamWriter ("page.aspx");
33 w.WriteLine (@"<%@ Page Language=""C#"" %>");
34 w.WriteLine (@"<% Console.WriteLine(""Hello""); %>");
35 w.Close ();
36 h.Execute ("page.aspx");