|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Alert another session, how?Hi
Is it somehow possible to alert all other sessions than the current, that something has changed making all other sessions take appropriate action.... If yes, what should I be looking into ?? TIA Søren hmmm, why do you need this ability?
I believe you should approach the problem in a different way. Strictly speaking, you can set a dependency on a file and update that file when new sessions are started but that seems like a poor design because web applications are inherently stateless. Maybe you should say why you need that functionality... -- Show quoteHide quoteRegards, Alvin Bruney [MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ http://www.lulu.com/owc ---------------------------------------------------------- "Søren M. Olesen" <smole***@hotmail.com> wrote in message news:%237LyUEiDFHA.3648@TK2MSFTNGP10.phx.gbl... > Hi > > Is it somehow possible to alert all other sessions than the current, that > something has changed making all other sessions take appropriate > action.... > > If yes, what should I be looking into ?? > > TIA > > Søren > Basically I want to tell the other sessions, that some of data/object
it/they holds are outdated, and needs to be reread from the database.... Regards, Søren Show quoteHide quote "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message news:%23YPhmp5DFHA.1296@TK2MSFTNGP10.phx.gbl... > hmmm, why do you need this ability? > > I believe you should approach the problem in a different way. Strictly > speaking, you can set a dependency on a file and update that file when new > sessions are started but that seems like a poor design because web > applications are inherently stateless. > > Maybe you should say why you need that functionality... > > -- > Regards, > Alvin Bruney [MVP ASP.NET] > > [Shameless Author plug] > The Microsoft Office Web Components Black Book with .NET > Now Available @ http://www.lulu.com/owc > ---------------------------------------------------------- > > > "Søren M. Olesen" <smole***@hotmail.com> wrote in message > news:%237LyUEiDFHA.3648@TK2MSFTNGP10.phx.gbl... >> Hi >> >> Is it somehow possible to alert all other sessions than the current, that >> something has changed making all other sessions take appropriate >> action.... >> >> If yes, what should I be looking into ?? >> >> TIA >> >> Søren >> > > One approach is to provide a static flag responsible for the validity of the
accessed data. A database trigger or a dependency placed on a file will monitor the file for changes. If the file changes, the static flag is set which in turn invalidates the session store. So you would access session in this way for each page if(session[xxx] != null && !staticFlag) do something. If you google around, you will find plenty of code snippets on how to add a cached dependency. ASP 2.0 will allow row level dependencies by the way. -- Show quoteHide quoteRegards, Alvin Bruney [MVP ASP.NET] [Shameless Author plug] The Microsoft Office Web Components Black Book with .NET Now Available @ http://www.lulu.com/owc ---------------------------------------------------------- "Søren M. Olesen" <smole***@hotmail.com> wrote in message news:ufiPaK7DFHA.3416@TK2MSFTNGP09.phx.gbl... > > Basically I want to tell the other sessions, that some of data/object > it/they holds are outdated, and needs to be reread from the database.... > > Regards, > > Søren > > > > "Alvin Bruney [MVP]" <vapor at steaming post office> wrote in message > news:%23YPhmp5DFHA.1296@TK2MSFTNGP10.phx.gbl... >> hmmm, why do you need this ability? >> >> I believe you should approach the problem in a different way. Strictly >> speaking, you can set a dependency on a file and update that file when >> new sessions are started but that seems like a poor design because web >> applications are inherently stateless. >> >> Maybe you should say why you need that functionality... >> >> -- >> Regards, >> Alvin Bruney [MVP ASP.NET] >> >> [Shameless Author plug] >> The Microsoft Office Web Components Black Book with .NET >> Now Available @ http://www.lulu.com/owc >> ---------------------------------------------------------- >> >> >> "Søren M. Olesen" <smole***@hotmail.com> wrote in message >> news:%237LyUEiDFHA.3648@TK2MSFTNGP10.phx.gbl... >>> Hi >>> >>> Is it somehow possible to alert all other sessions than the current, >>> that something has changed making all other sessions take appropriate >>> action.... >>> >>> If yes, what should I be looking into ?? >>> >>> TIA >>> >>> Søren >>> >> >> > >
Other interesting topics
|
|||||||||||||||||||||||