示例#1
0
        protected override void Run(HttpListenerContext context, InputReader input, OutputWriter output)
        {
            context.Response.StatusCode = 404;
            var writer = new OutputWriter(context.Response);
            writer.Write(@"<!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML 2.0//EN"">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL " + context.Request.Url.AbsolutePath + @" was not found on this server.</p>
</body></html>");
        }
示例#2
0
文件: MainPage.cs 项目: Yonom/WebNom
 protected override void Run(HttpListenerContext context, InputReader input, OutputWriter output)
 {
     output.Write("Hello world!");
 }
示例#3
0
文件: Page.cs 项目: Yonom/WebNom
 protected abstract void Run(HttpListenerContext context, InputReader input, OutputWriter output);