Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Override session object?

Reply
Thread Tools

Override session object?

 
 
Jim Corey
Guest
Posts: n/a
 
      04-26-2004

I've just learned that the app I've been working on is
going to be deployed to a web farm.

The app uses session variables, and I've been told that I want to use
some other technique.

I was wondering if there is a way to override the session object so that
I could leave most of the current code intact. Then
for the time being I could do what I want in this override section of
code.

I only have one page in the app, and this inherits from a base page.

TIA,
Jim


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      04-26-2004
Use SQL Server to store Session data. The same SQL Server can be assigned
for all machines in the Web Farm, and you won't have any issues except for
possible serialization issues with some of the stuff you're storing. When
using SQL Server to store Sessions, all Session objects must be
serializable.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Jim Corey" <> wrote in message
news:...
>
> I've just learned that the app I've been working on is
> going to be deployed to a web farm.
>
> The app uses session variables, and I've been told that I want to use
> some other technique.
>
> I was wondering if there is a way to override the session object so that
> I could leave most of the current code intact. Then
> for the time being I could do what I want in this override section of
> code.
>
> I only have one page in the app, and this inherits from a base page.
>
> TIA,
> Jim
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
 
John Saunders
Guest
Posts: n/a
 
      04-26-2004
When Kevin says, "use SQL Server", he means that you should set
<sessionState mode="SQLServer" /> in your web.config.

--
John Saunders
John.Saunders at SurfControl.com


"Kevin Spencer" <> wrote in message
news:el$...
> Use SQL Server to store Session data. The same SQL Server can be assigned
> for all machines in the Web Farm, and you won't have any issues except for
> possible serialization issues with some of the stuff you're storing. When
> using SQL Server to store Sessions, all Session objects must be
> serializable.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Jim Corey" <> wrote in message
> news:...
> >
> > I've just learned that the app I've been working on is
> > going to be deployed to a web farm.
> >
> > The app uses session variables, and I've been told that I want to use
> > some other technique.
> >
> > I was wondering if there is a way to override the session object so that
> > I could leave most of the current code intact. Then
> > for the time being I could do what I want in this override section of
> > code.
> >
> > I only have one page in the app, and this inherits from a base page.
> >
> > TIA,
> > Jim
> >
> >
> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!

>
>



 
Reply With Quote
 
Jim Corey
Guest
Posts: n/a
 
      04-27-2004

Well, my intention is not to use sqlserver.
Evidently the explanation here means that I could go to sqlserver
without changing the code.

But I was hoping that I could write my own code to override
the session object and then save the variables to viewstate or a hidden
html field in the new code for the override and
leave the rest of the code intact.

Jim

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
John Saunders
Guest
Posts: n/a
 
      04-27-2004
"Jim Corey" <> wrote in message
news:euJwGb$...
>
> Well, my intention is not to use sqlserver.
> Evidently the explanation here means that I could go to sqlserver
> without changing the code.
>
> But I was hoping that I could write my own code to override
> the session object and then save the variables to viewstate or a hidden
> html field in the new code for the override and
> leave the rest of the code intact.


I'm sure you could do this, but why reinvent the wheel? Microsoft has
already invented a variety of wheels, and they test them, too!
--
John Saunders
John.Saunders at SurfControl.com



 
Reply With Quote
 
Kevin Spencer
Guest
Posts: n/a
 
      04-27-2004
In addition to John's excellent advice, a good rule of thumb is, let
Microsoft manage as much of your stack as possible. Whatever part of your
stack you build, you have to manage. Whatever part of your stack Microsoft
builds, they have to manage.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"John Saunders" <john.saunders at SurfControl.com> wrote in message
news:#...
> "Jim Corey" <> wrote in message
> news:euJwGb$...
> >
> > Well, my intention is not to use sqlserver.
> > Evidently the explanation here means that I could go to sqlserver
> > without changing the code.
> >
> > But I was hoping that I could write my own code to override
> > the session object and then save the variables to viewstate or a hidden
> > html field in the new code for the override and
> > leave the rest of the code intact.

>
> I'm sure you could do this, but why reinvent the wheel? Microsoft has
> already invented a variety of wheels, and they test them, too!
> --
> John Saunders
> John.Saunders at SurfControl.com
>
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Override Session Timeout =?Utf-8?B?YmRldmlsZWQ=?= ASP .Net 8 03-16-2005 12:31 PM
Need to override session timeout due to page refresh... =?Utf-8?B?UlVTU0VMTCBNQ0dJTk5JUw==?= ASP .Net 1 03-10-2005 12:31 PM
Override session timeout lekshmi ASP .Net 2 03-07-2005 02:57 PM
Override Session Timeout lekshmi ASP .Net Web Services 0 03-03-2005 08:10 PM
Session State - What does it take to establish one single ASP.NET session per "browser session" Jeff Smythe ASP .Net 3 01-02-2004 04:10 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57