October 28, 2000

COM+ centric Assert

INTRODUCTION In my latest article here at VB2TheMax, I showed my code structure for COM+ components (Example of code structure for COM+ component) in preparation for a couple of debug centric articles. Now it’s time for the first of those, but be sure to have the code structure in mind

Beware of the Dictionary object in ASP pages

The Scripting.Dictionary object is marked as having a “Both” threading model, which means that you can freely assign it to a Session or an Application variable. However, the actual threading model for this object is “Apartment”, which means that you should use it only at the page scope level. You

Cache frequently used read-only data in Application variables

Unlike Session variables, there is only one instance of each Application variable. This means that storing data in an Application variable – including memory-consuming data such as long strings or arrays – doesn’t severily impact on system performance (unless you store strings with thousands and thousands of characters, of course).The

Large or nested include files can affect ASP performance

All include files appear to the ASP processor as belonging to the main ASP file, therefore they are read in memory and parsed as if they were physically pasted into the main ASP file. Therefore, while you should use include files for holding commonly used routines, you should be aware

Miscellaneous tips for improving ASP performance and robustness

Here’s a collection of quick-and-dirty tips for improve the performance and the robustness of your ASP applications:Use the Option Explicit directive to ensure that all variables are correctly declared and scoped. Mistyping a variable name is one of the most frequent causes of bugs inside ASP and VB applications.Set objects

Don’t mix script languages on the same page

You should never use more than one script language on the same ASP page, for example by mixing pieces of VBScript with portions of JavaScript. The reason is that there is a limit to the number of script engines that ASP can cache. When IIS processes an ASP file, it

Tricks with Server.MapPath

The Server.MapPath method can be used to retrieve several interesting properties about the running ASP application, for example: ‘ the current directorycurrDir = Server.MapPath(“.”)’ the parent directoryparentDir = Server.MapPath(“..”)’ the application’s root directoryrootDir = Server.MapPath(“/”) For example, you can store the application’s root directory in an Application variable, and use

Response.Buffer and Response.Flush

In order to redirect a web page after you have written to it, you must use a Response.Buffer = true at the top of the page.You may redirect the page using Response.Redirect(

No more posts to show