예제 #1
0
 public void Redirect(string url)
 {
     // TODO: This is a hack, better way to accomplish this?
     _response.SetStatus(HttpStatusCode.Redirect);
     _response.Headers.Add("Location", url);
     _response.Write(string.Format("<html><head><title>302 Found</title></head><body><h1>Found</h1><p>The document has moved <a href='{0}'>here</a>.</p></body></html>", url));
 }
예제 #2
0
 private static void write404(Response response)
 {
     response.SetStatus(HttpStatusCode.NotFound);
     response.Write("Sorry, I can't find this resource");
 }
예제 #3
0
 private static void write500(Response response, Exception ex)
 {
     response.SetStatus(HttpStatusCode.InternalServerError);
     response.Write("FubuMVC has detected an exception\r\n");
     response.Write(ex.ToString());
 }
예제 #4
0
 private static void write500(Response response, Exception ex)
 {
     response.SetStatus(HttpStatusCode.InternalServerError);
     response.Write("FubuMVC has detected an exception\r\n");
     response.Write(ex.ToString());
 }
예제 #5
0
 private static void write404(Response response)
 {
     response.SetStatus(HttpStatusCode.NotFound);
     response.Write("Sorry, I can't find this resource");
 }