Sture

Try this: download oFirstWebAppProcessChecker.pkg to your AppSrc directory, then in your WebApp:

Code:
Use AllWebAppClasses.pkg

Object oApplication is a cApplication
End_Object

Object oWebApp is a cWebApp
    Set psTheme to "Df_Web_Creme"

    Procedure OnFirstWebAppProcess Handle hProcID

        // Do whatever you need to do when the WebApp Pool is first started, i.e.:
        //
        // Direct_Output ("C:\Temp\" + String(hProcID) + ".txt")
        // Writeln ("First process was" * String(hProcID))
        // Close_Output
    End_Procedure

    Use oFirstWebAppProcessChecker.pkg

    // The rest of the WebApp...
Note: the OnFirstWebAppProcess event/procedure must come before the Use oFirstWebAppProcessChecker.pkg statement.

This works for me.

Mike