View Single Post
  #2 (permalink)  
Old 10-03-2006, 08:27 PM
brackett brackett is offline
Programmer
 
Join Date: May 2006
Posts: 193
Credits: 0
Rep Power: 11
brackett is on a distinguished road
Default

Quote:
Originally Posted by Void View Post
I'm developing a Web Application, and i don't understand how session and request variables work. Can someone point me in the right direction?

This is for a class.......
Session variables are stored on the server's memory and are never sent down to the client. This is more secure and faster (since RAM is faster than network), but takes up server RAM. Also, in a webfarm, session variables are per-server, which is not usually what you want. .NET can deal with this by having a "state server", but then you lose the performance advantage. You still have a security advantage, though, in that since it's never sent to the client, the client can't modify it directly.

Request variables are sent to the client at the end of 1 request, and are returned by the client at the beginning of the next. Cookies, form variables, and query strings are all examples of request variables. These can be modified by the client, or never returned by the client - so they're not all that reliable. That being said, for 9/10 of the data that needs to round trip, they're Good Enough.
Reply With Quote