Article View: borland.public.csharpbuilder.language.csharp
Article #561Re: HTTP Session
From: Sunil.P.Thomas
Date: Wed, 04 Aug 2004 14:08
Date: Wed, 04 Aug 2004 14:08
38 lines
2499 bytes
2499 bytes
Hi Marc ,
Thanks for your valuable suggestions.
Right now we are following your third suggestion , we are having a base
class for our pages.
But the other two are also very helpful.
Thanks once again.
Sunil
"Marc Rohloff [TeamB]" <"on request"> wrote in message
news:jc4ifgmzfmmd.dlg@marcrohloff.40tude.net...
> On Wed, 4 Aug 2004 10:38:53 +0530, Sunil.P.Thomas wrote:
>
> > The admin of the web site decides that a specific active user
> > should log off.
>
> There is no list of session objects. When a user fetches a page a
> session object is created and loaded from some sort of store. The page
> is processed and then the session is saved back to the store and the
> session object destroyed. It may be 20 minutes before the user
> accesses a page again and during that time there will be no session
> object for his session.
>
> Solutions:
> * You can access the store and change the session there. For example
> if you use SQL server as your store it should be easy to run a query
> against the database. If you are using a state server it might be
> possible you would have to try and find the API for the server.
>
> * Instead of coding in each page write a global handler in the
> global.asax file. I would guess you would want to write a handler for
> the 'BeginRequest' event.
>
> * Write Page class which does the common work for you. Derive all your
> pages from this base class.
>
> --
> Marc Rohloff [TeamB]
> marc rohloff at myrealbox dot com
Technical Details
Message-ID:
<4110ecb2@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<410f73df$1@newsgroups.borland.com> <1k9szl98zqicj$.dlg@marcrohloff.40tude.net> <41106e3f@newsgroups.borland.com> <jc4ifgmzfmmd.dlg@marcrohloff.40tude.net>Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,77cbdde8b2374aa7 X-Google-Attributes: gid1efe35,public X-Google-Language: ENGLISH,ASCII-7-bit From: "Sunil.P.Thomas" <sunil@netlinkindia.com> Newsgroups: borland.public.csharpbuilder.language.csharp References: <410f73df$1@newsgroups.borland.com> <1k9szl98zqicj$.dlg@marcrohloff.40tude.net> <41106e3f@newsgroups.borland.com> <jc4ifgmzfmmd.dlg@marcrohloff.40tude.net> Subject: Re: HTTP Session Date: Wed, 4 Aug 2004 19:38:56 +0530 Lines: 40 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 202.144.28.122 Message-ID: <4110ecb2@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1091628210 202.144.28.122 (4 Aug 2004 07:03:30 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail