Last post Feb 12, 2011 05:44 AM by sandy060583
Feb 11, 2011 12:34 PM|jibbering_squid|LINK
It is probably an absurd question, but I am wondering if using session variables to store and retrieve information is a bad practice? Let me give you some background:
I am developing a site for a friend of mine, and his site is hosted by Go-Daddy. My feeling is that Go-Daddy is not the best place to host a .NET site, but it is what it is.
After the first version of the site was published and people started using it, users immediately started having session time-out problems and null exceptions when referencing session variables. I researched everything I could and tried everything I could
think to do, but I just could not correct the issue. Then, while doing some testing, I discovered that users weren't individually timing-out and losing their session information, but, rather, all users where timing out at exactly the same time, regardless
of how long they had been logged in or what they were doing. So, for whatever reason, the server was just dumping all sessions at random intervals.
At this point I needed to move on with the project so I added a number of cookies to replace the session variables, and everything began working properly.
So, my questions is this: in a hosted environment, should I avoid using session variables? Is it as problamatic as my research and experience would indicate, or is this simply due to the fact that I am working with a poor hosting company in Go-Daddy?
Session statemanagement StateServer
Feb 11, 2011 03:30 PM|DarthSwian|LINK
I use goDaddy for my hosting and several free lance projects and have never had the problems you describe. However, I can tell you from the years I've used them not ALL servers are problem free. I've had to fight a few times to get sites moved to a more
stable server, but you CAN fight to get that done. They run as many sites on a server as possible, so when a server is maxed out and there's LOT of issues its not a great experience.
Feb 11, 2011 03:49 PM|budugu|LINK
in a hosted environment, should I avoid using session variables?
No,you can use session in shared server but as sugested by
DarthSwian make sure it's not over loaded. Session by default uses web server's memory to store data.
Is it as problamatic as my research and experience would indicate, or is this simply due to the fact that I am working with a poor hosting company in Go-Daddy?
Check with their techinical support, whether you can use any other shared server.
Feb 12, 2011 05:44 AM|sandy060583|LINK
You can use session in any environment...