10.3.1- Don't use the Session Object with the Dictionary Object
by NT Community Manager.
|
| << 10.3.0- The Dictionary Object | Chapter10 | 10.4.0- The FileSystemObject Object >> |
Don't use the Session Object with the Dictionary Object
Earlier we mentioned that it might be easier to store the reference to the Dictionary object in a Session variable so that we can use it again in another page. Indeed the ASP team themselves recommended that you do this very thing. We talked about the Session object in Chapter 8 . The Session object provides a storage space for information that can span multiple pages during a user's session. It seems inherently sensible to do this, but we don't recommend it.
This is a bit beyond the scope of this book, so we won't be covering this problem in too much detail. The basic problem is this: if you store a Dictionary object in a Session object, your web server will slow down in direct proportion to the amount of people accessing it. Worse still, if you store a Dictionary object in an Application object, you could crash the web server completely. This is due to a bug in the Dictionary object (when the Dictionary object was originally written, it was only intended to be used on the client side). There is a component available from Microsoft, which allows you to pass this kind of information between pages. It is the Lookuptable component and it is available from http://msdn.microsoft.com/workshop/server/downloads/lkuptbl_eula.asp. You can find more details about this error and how to avoid it at http://msdn.microsoft.com/msdn-online/MSDNchronicles2.asp.
We have now covered the various ways that the Dictionary object can be used. Next, we will take a look at a pair of objects that will allow you access to the file system and files of your web server. These objects will allow you to manipulate the files and directories on your server, as well as manipulate the contents of the individual files themselves.
| << 10.3.0- The Dictionary Object | Chapter10 | 10.4.0- The FileSystemObject Object >> |

RSS

