<%@ Language="VBScript" %> <% Option Explicit %> <% ' Intentionally byte-identical to /public/Default.asp. This is the test ' app's own bootstrap (separate IIS site/physical path from production), ' but the bootstrap logic itself is fully generic - it doesn't hardcode ' which routes exist (that lives in Framework/Application.wsc, shared by ' both sites via COM registration) or which site is calling it. If you ' change this file's logic, change public/Default.asp the same way, and ' vice versa. See docs/ARCHITECTURE.md for why there are two IIS sites. Dim route, httpMethod, logDir, ctx, app, statusLine, contentType, body route = Request.QueryString("route") httpMethod = Request.ServerVariables("REQUEST_METHOD") ' logs/ deliberately lives outside the served "public" webroot (IIS site ' physical path = public/), so a parent-relative MapPath is required here - ' requires enableParentPaths=true for this site. See docs/DECISIONS.md. logDir = Server.MapPath("../logs") Set ctx = Nothing On Error Resume Next Set ctx = Server.CreateObject("WscMvc.RequestContext") If Err.Number <> 0 Then Err.Clear On Error Goto 0 Response.Status = "500 Internal Server Error" Response.ContentType = "text/plain; charset=utf-8" Response.Write "Internal Server Error" Response.End End If On Error Goto 0 On Error Resume Next ctx.Initialize route, httpMethod, logDir If Err.Number <> 0 Then Err.Clear On Error Goto 0 Set ctx = Nothing Response.Status = "500 Internal Server Error" Response.ContentType = "text/plain; charset=utf-8" Response.Write "Internal Server Error" Response.End End If On Error Goto 0 Set app = Nothing On Error Resume Next Set app = Server.CreateObject("WscMvc.Application") If Err.Number <> 0 Then Err.Clear On Error Goto 0 Set ctx = Nothing Response.Status = "500 Internal Server Error" Response.ContentType = "text/plain; charset=utf-8" Response.Write "Internal Server Error" Response.End End If On Error Goto 0 statusLine = "" contentType = "" body = "" On Error Resume Next app.Run ctx, statusLine, contentType, body If Err.Number <> 0 Then Err.Clear On Error Goto 0 Set app = Nothing Set ctx = Nothing Response.Status = "500 Internal Server Error" Response.ContentType = "text/plain; charset=utf-8" Response.Write "Internal Server Error" Response.End End If On Error Goto 0 Response.Status = statusLine Response.ContentType = contentType Response.Write body Set app = Nothing Set ctx = Nothing %>