Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

79 Zeilen
2.0KB

  1. <%@ Language="VBScript" %>
  2. <% Option Explicit %>
  3. <%
  4. Dim route, httpMethod, logDir, ctx, app, applicationName, statusLine, contentType, body
  5. route = Request.QueryString("route")
  6. httpMethod = Request.ServerVariables("REQUEST_METHOD")
  7. applicationName = "production"
  8. ' logs/ deliberately lives outside the served "public" webroot (IIS site
  9. ' physical path = public/), so a parent-relative MapPath is required here -
  10. ' requires enableParentPaths=true for this site. See docs/DECISIONS.md.
  11. logDir = Server.MapPath("../logs")
  12. Set ctx = Nothing
  13. On Error Resume Next
  14. Set ctx = Server.CreateObject("WscMvc.RequestContext")
  15. If Err.Number <> 0 Then
  16. Err.Clear
  17. On Error Goto 0
  18. Response.Status = "500 Internal Server Error"
  19. Response.ContentType = "text/plain; charset=utf-8"
  20. Response.Write "Internal Server Error"
  21. Response.End
  22. End If
  23. On Error Goto 0
  24. On Error Resume Next
  25. ctx.Initialize route, httpMethod, logDir
  26. If Err.Number <> 0 Then
  27. Err.Clear
  28. On Error Goto 0
  29. Set ctx = Nothing
  30. Response.Status = "500 Internal Server Error"
  31. Response.ContentType = "text/plain; charset=utf-8"
  32. Response.Write "Internal Server Error"
  33. Response.End
  34. End If
  35. On Error Goto 0
  36. Set app = Nothing
  37. On Error Resume Next
  38. Set app = Server.CreateObject("WscMvc.Application")
  39. If Err.Number <> 0 Then
  40. Err.Clear
  41. On Error Goto 0
  42. Set ctx = Nothing
  43. Response.Status = "500 Internal Server Error"
  44. Response.ContentType = "text/plain; charset=utf-8"
  45. Response.Write "Internal Server Error"
  46. Response.End
  47. End If
  48. On Error Goto 0
  49. statusLine = ""
  50. contentType = ""
  51. body = ""
  52. On Error Resume Next
  53. app.Run ctx, applicationName, statusLine, contentType, body
  54. If Err.Number <> 0 Then
  55. Err.Clear
  56. On Error Goto 0
  57. Set app = Nothing
  58. Set ctx = Nothing
  59. Response.Status = "500 Internal Server Error"
  60. Response.ContentType = "text/plain; charset=utf-8"
  61. Response.Write "Internal Server Error"
  62. Response.End
  63. End If
  64. On Error Goto 0
  65. Response.Status = statusLine
  66. Response.ContentType = contentType
  67. Response.Write body
  68. Set app = Nothing
  69. Set ctx = Nothing
  70. %>

Powered by TurnKey Linux.