Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Session variable question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Session variable question

 Post Reply Post Reply
Author
sabrin514 View Drop Down
Newbie
Newbie


Joined: 19 December 2003
Status: Offline
Points: 26
Post Options Post Options   Thanks (0) Thanks(0)   Quote sabrin514 Quote  Post ReplyReply Direct Link To This Post Topic: Session variable question
    Posted: 01 July 2004 at 3:01pm

I use session variables to store important data from a class object data in a VB. NET multi-user tracking application I designed. Currently we have the application being run from a single server.

The use of session variables in the application works very well; however, I am told that session variables cannot be used in a multiple server environment because the user may be hitting on a different server each time (depending on load distribution) and that this will have an adverse effect.

Can anyone verify this as an issue? If so, what are possible alternatives that involve the least amount of recoding?

Thanks.

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 01 July 2004 at 7:18pm

The multi-server issue is true. You'll have to serialize the session object and stash it in a db. Use querystring/get to pass your own unigue session ID/DB key as part of each uri within the site. I seem to recall some pretty good examples of this on www.asp.net and in the mskb.

You'll also have some cert issues if you're using ssl. May need a different type of cert.



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
Mart View Drop Down
Senior Member
Senior Member
Avatar

Joined: 30 November 2002
Status: Offline
Points: 2304
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mart Quote  Post ReplyReply Direct Link To This Post Posted: 02 July 2004 at 2:52am
 You shouldn't store important information in session variables on shared hosting anyway really . . .
Back to Top
Bunce View Drop Down
Senior Member
Senior Member
Avatar

Joined: 10 April 2002
Location: Australia
Status: Offline
Points: 846
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bunce Quote  Post ReplyReply Direct Link To This Post Posted: 05 July 2004 at 4:06am
Originally posted by dpyers dpyers wrote:

The multi-server issue is true. You'll have to serialize the session object and stash it in a db. Use querystring/get to pass your own unigue session ID/DB key as part of each uri within the site. I seem to recall some pretty good examples of this on www.asp.net and in the mskb.

You'll also have some cert issues if you're using ssl. May need a different type of cert.

I don't believe you'll have to make any coding changes at all.

All you need to do is change the location where session info is stored.  You can do this in your web.config.

From memory, there are 3 options - memory (in process), database and one other which I've forgotten. 

This should get around your server-farm issue.

Cheers,
Andrew


EDIT: The other is out of process (state server).  See:
http://www.ondotnet.com/pub/a/dotnet/2003/03/24/sessionstate .html



Edited by Bunce
There have been many, many posts made throughout the world...
This was one of them.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.