Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Caching / December 2003

Tip: Looking for answers? Try searching our database.

session and application substitute

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
- 06 Dec 2003 13:28 GMT
Hi
I know session & application objects in classic asp.

now in ASP.NET what are the best technique to maintaine a
stable application  information and session information?

is it true that cash object is more recommanded than
application ?
and what about session?

Thanks
Barak
Alvin Bruney - 06 Dec 2003 16:32 GMT
Session and application are designed to look and feel the same like classic.
The similarities end there, under the hood they have been totally
re-architetected.

There is not straightforward answer to your last question because it really
depends on what you are doing. Some techniques lend themselves best to
session, others require cache,  others require state management in a
database, and there are these rare occasions that warrant custom state
management. The options are present because most programming solutions do
not always fit neatly into one box. Why are you trying to do? If you can be
more specific about your problem, we can generaly give a more accurate
recommendation.

Signature

Regards,
Alvin Bruney

> Hi
> I know session & application objects in classic asp.
[quoted text clipped - 8 lines]
> Thanks
> Barak
Barak - 07 Dec 2003 14:34 GMT
Well, I just want to know if there is a stable
recommanded technique to maintaine application and
session data in less memory price than session &
application objects.
I read that I can declare a static varible in
global.asax,which in most cases can be faster than
accessing the application object.
is there a way to use class members as if they were a
session variable?

Thanks
Barak
>-----Original Message-----
>Session and application are designed to look and feel the same like classic.
[quoted text clipped - 24 lines]
>
>.
Alvin Bruney - 07 Dec 2003 22:00 GMT
Sure you can put the variables in the global asax file. The downside to that
is it is now accessible to the entire application so the usual
synchronization issues apply.

> is there a way to use class members as if they were a
> session variable?

I'm not sure what you mean by this. Are you thinking in terms of syntax?
Session["somestuff"] = "blah". You can force this effect on a class by
overloading the indexer property to get it to behave as if it had dictionary
like syntax. If you are thinking about using the variable and it going away
once the session end, you will have to manually code that by tieing in to
the session end event and taking the appropriate action to empty these
variables which is the reason session is around anyway.

The memory store for these objects aren't all that expensive by the way and
the extra functionality provided by state managed objects negate the
negative -effects if any- so this really shouldn't be a determining factor
in most applications unless you are squeezing for efficiency.

Signature

Regards,
Alvin Bruney
http://www.networkip.net/dotnet/tidbits/default.htm

> Well, I just want to know if there is a stable
> recommanded technique to maintaine application and
[quoted text clipped - 47 lines]
> >
> >.
Khaled M. Hnidk - 08 Dec 2003 11:20 GMT
I think the primary factor of choice is the purpose Appliaction, Session and
cach are designed for deferent purposes surly you can use them the way you
like - as long they fullfill the needs - but that won't get you the best
results.

for instance
Session : short time (spans to user' sesion) small data + fits well in web
farm - definitly per user
application: appliaction life time - available to all users

both provide exclent locking mechnasim

programmable life time and dependcy. all users share all data in addion it
to that has the needed locking mechnasim

Hnidk

> Sure you can put the variables in the global asax file. The downside to that
> is it is now accessible to the entire application so the usual
[quoted text clipped - 67 lines]
> > >
> > >.
Khaled M. Hnidk - 08 Dec 2003 11:22 GMT
yeah one more thing.. chaching can be per page/control output which is not
possible in session / application or suggessted static variable (unless u
used some devlish way to do that)

Hnidk

> Sure you can put the variables in the global asax file. The downside to that
> is it is now accessible to the entire application so the usual
[quoted text clipped - 67 lines]
> > >
> > >.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.