ASP Classic Compiler is now available in NuGet

I know this is very, very late, but I hope it is better than never. To make it easy to experiment with ASP Classic Compiler, I made the .net 4.x binaries available in NuGet. So it is now extremely easy to try it:

  1. From the package console of any .NET 4.x web project, run “Install-Package Dlrsoft.Asp”.
  2. To switch from AspClassic to Asp Classic Compiler in the project, add the following section to the system.webServer handlers section:
      <system.webServer>
        <handlers>
          <remove name="ASPClassic"/>
          <add name="ASPClassic" verb="*" path="*.asp" type="Dlrsoft.Asp.AspHandler, Dlrsoft.Asp"/>
        </handlers>
      </system.webServer>
    Comment out the section to switch back.
  3. Add a test page StringBuilder.asp:
    <%
        imports system
        dim s = new system.text.stringbuilder()
        dim i
        
        s = s + "<table>"
        for i = 1 to 12
            s = s + "<tr>"
            s = s + "<td>" + i + "</td>"
            s = s + "<td>" + MonthName(i) + "</td>"
            s = s + "</tr>"
        next
        s = s + "</table>"
        response.Write(s)
     
    %>
    This code uses the .net extension so it will only work with Asp Classic Compiler.

Happy experimenting!

No Comments