private void SendEmptyResponsePage()
        {
            var emptyResponsePage = new Fos.CustomPages.EmptyResponsePage();

            OwinContext.SetResponseHeader("Content-Type", "text/html");
            OwinContext.ResponseStatusCodeAndReason = "500 Internal Server Error";

            using (var sw = new StreamWriter(Stdout))
            {
                sw.Write(emptyResponsePage.Contents);
            }

            Stdout.Flush();
        }
        private void SendErrorPage(Exception applicationEx)
        {
            var errorPage = new Fos.CustomPages.ApplicationErrorPage(applicationEx);

            OwinContext.SetResponseHeader("Content-Type", "text/html");
            OwinContext.ResponseStatusCodeAndReason = "500 Internal Server Error";

            using (var sw = new StreamWriter(Stdout))
            {
                sw.Write(errorPage.Contents);
            }

            Stdout.Flush();
        }