Align libgc vcxproj with makefile.
[mono.git] / mono / tests / bug-80307.cs
1 using System;
2 using System.IO;
3 using System.Web;
4 using System.Web.Hosting;
5
6 class TinyHost : MarshalByRefObject
7 {
8         public static TinyHost CreateHost ()
9         {
10                 string path = Directory.GetCurrentDirectory ();
11                 string bin = Path.Combine (path, "bin");
12                 string asm = Path.GetFileName (typeof (TinyHost).Assembly.Location);
13
14                 Directory.CreateDirectory (bin);
15                 File.Copy (asm, Path.Combine (bin, asm), true);
16
17                 return (TinyHost) ApplicationHost.CreateApplicationHost (
18                         typeof (TinyHost), "/", path);
19
20         }
21
22         public void Execute (string page)
23         {
24                 SimpleWorkerRequest req = new SimpleWorkerRequest (
25                         page, "", Console.Out);
26                 HttpRuntime.ProcessRequest (req);
27         }
28
29         static void Main ()
30         {
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");
37         }
38 }