Recently in Classic ASP Category
A couple of days ago I passed comment on Bill Staples (the Product Unit Manager for IIS) blog on a posting he made titled My Take: IIS vs. Apache, a post that's well worth a read even if you only ever work with Microsoft technologies as during his compare and contrast he highlights a lot of the shiny newness that is IIS7. In my comment I noted that it can be hard work to get Classic ASP running with the same behaviour as downlevel versions of IIS.
A day later Tips for Classic ASP developers on IIS7 appeared, which covers the whole shooting match, upto and including getting Access databases to behave properly wtih IIS7 and Classic ASP, which was a big pain point for me when a friend got a new Vista based laptop and I lent a hand getting it working. There are other bits of information out there, but this has it all in one, is well written and you know the quality's going to be high given the guy knows more about IIS7 than a soothsayer does about chicken guts! ;)
Bill, thank you! Now, any chance of hopping in a time machine and posting that a month ago? ;)
Part of an application I work on derives some of its configuration from the contents of a global.asa file, with configuration hard-coded. I've been looking at ways of separating the configuration out to make it easier to maintain and to understand. Using a simple structure of:
for the XML, and storing it in a file called "config.xml" with the appropriate permissions, obviously! I can then use the following code from ASP to parse this file and place the resultant information into the ASP Application object ready for use within any page:
Sub ReadAndParseXMLConfiguration()
' Called in Application_OnStart
Dim oXmlDocument
Set oXmlDocument = Server.CreateObject("Microsoft.XMLDOM")
oXmlDocument.Load(Server.MapPath("config.xml"))
If oXmlDocument.parseError.errorcode <> 0 Then
Err.Raise oXmlDocument.parseError.errorcode, ,oXmlDocument.parseError.reason
End If
Dim oXmlNode
For Each oXmlNode in oXmlDocument.documentElement.childNodes
Application(oXmlNode.NodeName) = oXmlNode.Text
Next
End Sub
I've managed to reduce the size of the global.asa, make it easier for non-developers to change configuration settings. Now all I've got to do is get the code change agreed!
