Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
In this short video I want to tell you about Session State Compression. Again another new idea in ASP.NET 4 as a result, it's going to be a hot topic on the exam at least in one or two instances. You will see this, so let's talk about Session State Compression. Now ASP.NET provides two methods for storing Session State data when you're working across a web farm or multiple web servers. Now I talked about Session State in some separate videos here in the course but now we want to talk about the two ways that we're going to do Session State Storage and that is a State Server which just as to refresh your memory here, this is where we're storing our session data in a Windows service on a remote server. So since we're moving it to a remote location, we can manage sessions data across multiple web servers, because everybody has to contact that one common point to read and write session information. Now the database version of Session State storage is where we're going to use a SQLServer database, so again same thing, since we've got a common point off, of our web server, any one of our web servers in the farm, all the web servers in the farm can refer to this one location and we can provide Session State Data Management across a web farm. So anytime we're using State Server or database methods for storing our Session State data then we can use Compression. Alright. Now there's a Captain Obvious warning here. I'm about to tell you something and some of you guys are going to yell at the monitor and say really now? You're kidding. Okay. Here we go, the Session State data that's stored remotely has to be transported across the network, like you didn't already know that, but I'm not wasting your time here, I just want to make sure that we're on the same page. If we've got to move this data across the network, we now have introduced a potential problem for ourselves because this data has to be serialized to be put on the wire, then it goes through OSI Stack and all that stuff, don't want to turn this into an A Plus course, but the data has to be serialized to be transported and this data can become sizable, it depends on what you're storing, how much you're storing and all that sort of stuff. ASP.NET 4 allows any out of process Session State data. Meaning the State Server or the database versions of storing Session State data, either one of these can be compressed. Now compressing it obviously makes it smaller, can move across the wire faster, we can use move more information all that sort of stuff. Okay. So we can turn on Compression, if we're using those out of process Session State Data Methods. To compress the Session State Data I want you to see how tough this is. You're going to make one change to the Session State Tag in the Web.Config file. You ready? Here we go. We are going to set Compression Enabled equal to true. Alright. And there it is. So you'll find the Session State Tag in your Web.Config file, you will just set Compression Enabled equal true and you're in business. You are now compressing your data which is going to make for less network traffic, faster passing of this data between your remote location where your Session State's being stored and the particular web server that needs in it in the web farm okay? Make sure you understand this, make sure it makes sense, it's almost too simplistic then you'll end up missing part of it, but just make sure you understand the 2 out of process Session State Data Storage Methods can compress the data and to do that, you just Compression Enabled equal to true in the Web.Config file and you're in business. This should be a give me question on the exam or this should be a give me portion of an answer when you're dealing with Session State Compression.
| Course: | Designing and Developing ASP.NET 4 Web Apps (Exam 70-519) |
| Author: | Mark Long |
| SKU: | 34292 |
| ISBN: | 978-1-61866-029-9 |
| Release Date: | 2011-12-31 |
| Duration: | 8.5 hrs / 108 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |