Some months ago Daniel Cazzulino publishes an excellent IHttpModule to use Google Analitycs with adding code in the pages of a web site.
After using it some weeks I found an error that affects the Clearscreen CAPTCHA Antispam Control.
Basically the problem is that the module adds the HTML code necessary to use Google Analytics in responses that are not HTML (like an image).

This is quick fix to this bug:

void OnBeginRequest(object sender, EventArgs e)
{
   if ( String.Compare(“text/html”, application.Response.ContentType, true) == 0
&& ! ( application.Request.QueryString.Count != 0
&& application.Request.QueryString.GetKey(0) == “hip” ) )
application.Response.Filter = new AnalyticsStream(application.Response.Filter, accountNumber);
}

Here you can download a test solution to reproduce this bug.

Many times it is necessary to be able to test each layer of an application individually. This task becomes specially difficult with the data access code and the unit tests since is complex to assure the results of the tests if each developer doesn’t have a private database.

To solve this problem I have developed a ADO.NET Data Provider that allows to test the data access code without accessing to the database.

The Mock Data Provider has two operation modes:
In the “recording” mode it acts of Proxy against another ADO.NET Data Provider and it records the results of all the executions against the database.
In the “mock” mode it returns the results that it registered previously in the “recording” mode, without being connected to the database.

In the conference that I will give on Thursday 24th I will make a complete demonstration of this tool meanwhile you can download the code from here together with a example of use.

Kenny Lamoot found a problem in the form in that the size of the message is measured to decide if it is compressed or not based on the configuration of the threshold.

The updated versions are available for download here (WSE 2) and here (WSE 3).

Today I upgrade WS-compression for WSE3 with a new constructor in the class CompressionAssertion. This constructor allows to set the compression policy by code without necessity of configuration file. Thanks to Kenny Lamoot for this idea.

Today was a boring day 🙂 so only for fun I upgrade a series of WSE 2 custom transports to WSE 3. Besides upgrade them I improve their configuration and add a complete example of use.

These are the transports:

Download the WSE 3 Custom Transports Collecion here.

FileHelpers 1.5.0 has been released. If you need to import/export data from text files in .NET Framework this cool library is the solution.

Yesterday I upgraded the BizTalk 2006 Dynamic ODBC Adapter (originally published in GotDotNet by ToddVanNurden) fixing some errors and improving the organization of the code.

Download it from here.

Three new additons to my “My .NET Development Toolbox“:

UPDATE: More tools here.

Yesterday after reorganizing my code snippets the code editor of visual studio still show the same snippets folder that no longer exist. The solution for this problem was to eliminate the file C:\Documents and Settings\[UserName]\Local Settings\Application Data\Microsoft\VisualStudio\8.0\1033\ExpansionsXML.xml