<%@ Application Language="VB" %> <object id="LXFramework" runat="server" class="Framework.Framework.App" scope="Application" /> <script runat=server> Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs) LXFramework.nApplicationMode = 3 LXFramework.oServer = Server LXFramework.Initialize() End Sub </script>So, on the first hit to the Web site, the framework Initialize() is created. This is where all the settings are read.
Namespace Framework Public Class WebForm Inherits System.Web.UI.Page Public oProcess As Framework.LXProcess = New Framework.LXProcess() Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init oProcess.oApp = Application.StaticObjects.GetObject("LXFramework") oProcess.oRequest = Request oProcess.oResponse = Response oProcess.oServer = Server oProcess.oPage = Me oProcess.BeginRequest() End Sub Sub Page_UnLoad(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Unload oProcess.EndRequest() End Sub Sub Page_Error(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Error oProcess.ErrorSetup() End Sub End Class End NamespaceSo, basically, on each hit, my Web site hit process object is created and I assign the framework application object to it. This line does it:
oProcess.oApp = Application.StaticObjects.GetObject("LXFramework")But, as I mentioned, after a while, on a specific server, it gets lost. As you mentioned, this has to be enhanced with a static approach so it would reload by itself on the next hit following that reset.