Archives / 2009 / December
  • Installing FMStocks 1.0 on later platforms

    My latest version ASP Classic Compiler can now run FMStocks 1.0, an end-to-end sample application. I have uploaded a version of FMStocks at The version that I uploaded already has the web.config file as well as the bin directory containing the necessary dlls. To run it, you need to map a virtual directory to the website directory. Use IIS manager to map the ISAPI dll for the .asp extension to the same DLL used by the .aspx extension on your virtual directory. You still need to create the database and register the COM objects. Since the setup program was written for Windows 2000/SQL Server 2003, it may not work correctly for later platforms. The following procedure shows how to install them on a later platform manually.

    1. To install the COM objects, just use regsvr32 to register the FMStocks_Bus.dll and FMStocks_DB.dll in the objects\Distribution directory.
    2. To create the database, first useISQL to open the schema.sql file and run it. This will create the database, login and the tables. Note that your sql server must be in mixed security mode.
    3. Next, open Create 10,000 test accounts.sql with ISQL and execute it. This will create the sample accounts.
    4. Lastly, use import feature to import the data in rawdata.mdb into the stocks database.
  • ASP Classic Compiler 0.6.0 released. It can run FMStocks 1.0

    I uploaded ASP Classic Compiler 0.6.0 to We reached a small milestone: it can run Fitch and Mather Stocks 1.0 now. This is the first end-to-end example that we can run with ASP Classic Compiler. Our goal is to be able to run most of ASP classic applications under ASP.NET without modifications, but we actually need to make two minor modifications. Both cases are due to the difference between interpreter and compiler. With interpreter, you can have syntax error in dead code (unreached code); with compiler, the entire code has to be syntactically correct for the code to compile.

    The first change is at t_head.asp line 71, we added "dim i". That is because we have undeclared variable when the option explicit is on. Since the procedure was never executed, the ASP interpreter never caught the error but we have to fix it for the ASP Classic Compiler.

    The second change is at SellStockAction.asp line 17. We added  "dim m_strMainPrompt". Again, this is an undeclared variable. Since the “on error resume next” is on, the VBScript interpreter would actually skip over the syntactical errors but the code will never work correctly. For the compiler, “on error resume next” cannot trap compilation errors.

    In addition, several pages use @Transaction declaration. They are ignored since we do not have Com+ transaction support at the page level. Transaction for objects in Com+ packages are supported. 

    I have uploaded preconfigured FMStocks with web.config and .net DLLs to It is still necessary to register the COM objects and install the SQL database. Since the setup program was written for Windows 2000/SQL Server 2000, it does not work correctly for the later platforms. I will document how to install it in a later platform in a separate blog entry.

    Here is the plan and call for action:

    1. I will come out with some debugging aid in the next version. Trouble shooting both asp problem and the compiler problem without debugging aid is painful.
    2. The parser is 90% done. If you use ASP Classic Compiler to run your application, I do want you to report all syntax errors so that I can fix them.
    3. The code generator quality is at 60-70% level. I want you to hold on the report of runtime errors until I provide better debugging aid.
    4. I will continue test ASP Classic Compiler using some open source samples/applications. Drop me a not if you have any suggestion.
    5. I originally envision to have class support after the 1.0 release, but it looks like now that I will implement the Class feature before the 1.0 release.
  • Uploaded ASP Classic Compiler Version to

    With feedbacks from several enthusiastic users, I have fixed many little bugs. Give the latest version a try. Post bugs on the forum as usual. Happy computing!

    I am running into a little bit of difficulty with CLR debugger integration. In order to generate the debug symbol, I need to use LambdaExpression.CompileToMethod(). However, this method does not support DynamicExpression that I heavily rely on. So I am back to research and trying to figure out how to use Microsoft.Scripting.Debugging.dll. In the mean time, I am going to enable tracing in near future so that at least we can figure out problems through tracing.