Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Major mixup in two ASP.NET transactions
Message
 
 
To
03/09/2006 11:16:35
General information
Forum:
ASP.NET
Category:
Other
Environment versions
Environment:
VB 8.0
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01150471
Message ID:
01150602
Views:
20
I see only two choices. Either change the design of your framework to support being shared by multiple sessions or instanciate your framework once for each session. To load the framework once the first time a new client hits the site you would need to scope your framework to session instead of application. Subsequent hits by the client would then be fast since the framework is already loaded to his session. The downside is now you have a copy of your framework instanciated for each session which may cause resource issues on high volume sites.
i.e.:
<object id="LXFramework" runat="server" class="Framework.Framework.App" scope="Session" />
Then change all of your global.ascx subs starting with Application_ to Session_

I do not like using complex frameworks especially for web based applications. The design needs to be kept simple and lightweight. When the asp.net 2.0 release came out the majority of my framework was redesigned around lightweight static classes.



>>From within your LXFramework you could obtain the reference you need using System.Web.HttpContext.Current. This will give you visibility of the calling aspx page's response, request, session, application and server objects. This would mean changing all the framework code that uses the common oResponse, oRequest, oServer to
>>HttpContext.Current.Response, HttpContext.Current.Request and HttpContext.Current.Server.
>
>Yes, but I need to have a way to reference that as is presently. As per your next paragraph, that is what we would target for.
>
>>As Viv has stated the core issue is with all client sessions accessing a single instance of your framework. You may wish to instanciate an individual copy of your framework for each session.
>
>Correct, but I need to have the Initialize() method of the framework to be executed only once. This takes some time and all the core framework initialization is in there. I cannot afford to redo all that for every hit. When I was using WWWC framework, I implemented a way to have everything loaded in memory for the first hit of every WWWC instance I had in memory. Then, on the next hits, everything was extremely fast. I cannot think I wouldn't be able to achieve that in .NET. I cannot think everyone is building application that are initializing everything on every hit.
Michael McLain
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform