It Already Is A Scripting Language

My recent post about the possibility of considering maybe someday perhaps adding “top level” methods to C# in order to better enable “scripty” scenarios generated a surprising amount of immediate emphatic pushback. Check out the comments to see what I mean. Two things immediately come to mind. First off, the suggestion made by a significant…


How To Obtain The Name Of The Client From The ASP Server

Here’s a question about client side vs. server side scripting that I got recently: I want to get the machine name of the client the request is being made from. With ASP I can get the IP address using this code: ipaddr = Request.ServerVariables(“REMOTE_ADDR”) But I don’t know how to get the name of the…


What’s the Difference between WScript.CreateObject, Server.CreateObject and CreateObject?

A reader asked me last week I have always used Server.CreateObject in ASP scripts and WScript.CreateObject in WSH scripts, because I was unable to find any *convincing* information on the subject and therefore assumed that they were there to be used, and were in some way beneficial… but perhaps they’re not?! What exactly is the…


VBScript and JScript Don’t Mix, at least in ASP

A reader wrote me recently to describe a problem that I used to hear fairly often: I write ASP code using VBScript and a coworker of mine uses JScript.  We were wondering if we could combine our code in ASP.  However, it does not seem to be working right.  Here is an example of where we are having trouble:…


The Tragedy of Thread Happiness Disease

A JOS reader interested in developing server software asked recently Is it possible to determine the number of concurrent threads a server can support from the server’s specification? Now, as I’ve said before, I’m no expert on performance tuning multi-threaded applications, but I have picked up a thing or two hanging around the real experts…


Speeding Can Slow You Down

I hope all you readers living in the United States had a restful and enjoyable Thanksgiving holiday. I sure did. I’ve been meaning to talk a bit about some of the performance issues you run into when tuning massively multi-threaded applications, like the ASP engine.  I’d like to start off by saying that I am…


Eval is Evil, Part Two

As I promised, more information on why eval is evil.  (We once considered having T-shirts printed up that said “Eval is evil!” on one side and “Script happens!” on the other, but the PM’s never managed to tear themselves away from their web browsing long enough to order them.)     Incidentally, a buddy of mine who…


Global State On Servers Considered Harmful

The other day I noted that extending the built-in objects in JScript .NET is no longer legal in “fast mode”.  Of course, this is still legal in “compatibility mode” if you need it, but why did we take it out of fast mode?   As several readers have pointed out, this is actually a kind…


Arrrrr! Cap’n Eric be learnin’ about threadin’ the harrrrd way

Avast ye scurvy dogs, it be National Talk Like A Pirate Day! A scurvy bilge rat commented on the preceding discussion about putting apartment threaded objects in Session scope: back in the era of the NT4 Option Pack I wrote a lot of code that involved stashing Scripting.Dictionary objects in both session and application scope….


Why is it a bad idea to put script objects in Session scope?

Often a web site will have a series of related pages requested one after the other by the same user.  As a convenience for the site developers, the ASP object model provides a Session object to store server-side state for a current user.  It also has a global “Application” object which stores state for an…