Tuesday, 19 March 2013

Building Better IIS Servers using ISAPI Filters

What are they used for?

ISAPI Filters are simply DLLs (ISAPI stands for Internet Server API - Microsoft's answer to CGI applications).

How are they written?

ISAPI Filters are used to modify and expand the functionality of IIS. Both ISAPI filters and extensions are developed in C++.

How do they work?

Suppose you have an HTTP transaction between the browser and IIS. Several events may be generated in this process. Some of the these events may be subscribed to by "filters". Filters will be applied in the order of priority. If the event relates to the filter, IIS knows that it has to invoke the HttpFilterProc entry point. The filter can then do some custom processing.

Notable Examples

ASP technology is implemented as an ISAPI filter (DLL that gets loaded up into the same memory space as IIS).

Related Tangent: What EXACTLY do we mean by CGI? CGI stands for Common Gateway Interface. It's a method for for web server software to delegate generation of web content to executable files. A variation called FastCGI is implemented by a number of web servers such as Apache, Cherokee and IIS.

Saturday, 16 March 2013

BITS, BFE and other "Standard" Windows Services

BITS is a Windows service, that stands for Background Intelligent Transfer Service. This helps to transfer files in the background using idle network bandwidth. It is used by Windows update and Internet Explorer.

BFE is the Base Filtering Engine which manages firewall and IPsec (Internet Protocol security) policies. Stopping or disabling the BFE service will significantly reduce system security.

Related Tangent: What is IPsec? It's a suite of protocols for authenticating and encrypting information at the IP packet level. Developed in conjunction with IPv6. Its major application is in Virtual Private Networks.

IIS_WPG Group

The IIS_WPG user group is new in IIS 6.0. This provides the minimum set of privileges and permissions needed to start a worker process on a web server.

If a worker process is not in the IIS_WPG group, or have the equivalent permissions, that process will not start.

Tuesday, 12 March 2013

NTFS Debunked

It's been a while since Windows Joe talked about NTFS. Today, "Win-Joe" debunks the complex jargon surrounding this file system technology.

The NTFS technology was preceded by a system called FAT (File Allocation Table).

You need this to understand output from CHKDSK (outputs file system integrity status).

USN JOURNAL

Update Sequence Number Journal.  Records changes on NTFS volumes.

The above must be explained. NTFS is a journaling file system which means changes are recorded in a journal (typically a circular log in a dedicated area of the file system).

Sunday, 10 March 2013

Chemical Processes as Analogies for Software Design

We analyse two physical/chemical processes as useful idiomatic templates for programming.

Decanting
Filtration e.g. filter paper -> semi-permeable membrane placed perpendicular to liquid or air flow.  Tea bags are also filters.

Wednesday, 20 February 2013

Respect for Base Libraries

Always in projects look for opportunities to build up a strong set of base libraries. Even if you are writing throwaway code, may be some one-off testing application that tests something you've built, if there are some functions that can be "outsourced" to a base library, take the opportunity to do so. That way, your base libraries will mature and develop until all application development becomes a trivial task.

Friday, 8 February 2013

Storing C# Strings in an Oracle Database

This is not an Oracle blog, and Windows Joe has no intention of turning it into such. However, since Oracle coding is occasionally required by the Windows programmer, occasional clarifications on the aforementioned technology are sometimes warranted.

In addition, such posts may be of interest to database enthusiasts wanting to refresh the basics.

One such, is the popular newbie question (and also asked by experienced bods who haven't touched Oracle in a long time) is what datatype to use for string data?

VARCHAR - not to be used. Why - because Oracle says so. It may work, but is not recommended.
VARCHAR2 - the recommended way to store strings (or more precisely, VARIABLE LENGTH character strings).
CHAR - for fixed length character strings.Using this type to store variable length strings is a waste of space.

So in 95% of cases, you need a VARCHAR2 to represent strings in an Oracle database.