Adding Async=true to the page- no side effects noticed.

Recently I needed to implement PageAsyncTask  in .Net 4 web forms application.

“A PageAsyncTask object must be registered to the page through the RegisterAsyncTask method. The page itself does not have to be processed asynchronously to execute asynchronous tasks. You can set the Async attribute to either true (as shown in the following code example) or false on the page directive and the asynchronous tasks will still be processed asynchronously:

<%@ Page Async=”true” %>

When the Async attribute is set to false, the thread that executes the page will be blocked until all asynchronous tasks are complete.”

I was worry about any site effects if I will set  Async=true on the existing page.
The only documented restrictions, that I found are that

@Async is not compatible with @AspCompat and Transaction attributes (from @ Page directive  MSDN article). In other words, 

Asynchronous pages do not work when the AspCompat attribute is set to true or the Transactionattribute is set to a value other than Disabled in the @ Page directive

From our tests we conclude, that adding Async=true to the page is quite safe, even if you don’t always call Async tasks from the page 

Monitoring Database disk space

An article Data files: To Autogrow Or Not To Autogrow? recommends NOT to rely on auto-grow, because it causing delays in unplanned times.

We should mtonitor database files(both data and log), and if they close to max capacity, manually increase the size.

 However it doesn’t give references, how to monitor the free space inside databases.
I’ve tried to look how to do it. 

It can be done manually using   

execute sp_spaceused for the database in question or 

sp_SOS (can be downloaded from

Alternatively you can run SQL commands as suggested in Http:// by Michael Valentine Jones

[FREE_SPACE_MB] = convert(decimal(12,2),round((a.size-fileproperty(,’SpaceUsed’))/128.000,2)) 
from dbo.sysfiles a
More useful article Monitor database file sizes with SQL Server Jobs describes how to setup monitoring

 Finally I found the excellent article

Managing Database Data Usage With Custom Space Alerts, that can be followed even support personnel without much DBA experience.

Assign multiple test categories using TestCategoryAttribute

I am using TestCategoryAttribute to filter which tests to run during builds and wandered, how to -how to assign multiple test categories.
According to constructor documentation only single category can be specified.  However TestCategories Property (plural!)can return multiple categories.
Grouping Tests into Test Categories: You can add an automated test to one or multiple test categories using a test attribute. Each test can belong to multiple test categories.
The recommended approach from MSDN How to: Group and Run Automated Tests Using Test Categories is to specify multiple TestCategory attributes like the following
[TestCategory("Nightly"), TestCategory("Weekly"), TestCategory("ShoppingCart"), TestMethod()]
public Void DebitTest() { }
shows how enums can be used instead of strings.
It also explains, that TestCategories Property can be used in derived custom attributes.

What is testable code?

We are improving quality of code and trying to develop more unit tests. The question that developers asked  was  “How to make code testable ?”

 First and foremost, its loosely coupled, taking advantage of dependency injection (and auto-wiring), composition and interface-programming. Testable code is also readable – meaning it leverages single responsibility principle and Liskov substitution principle.
A few practical suggestions are listed in 
More recommendations are in 
It is slightly too theoretical – “ the trick is translating these abstract concepts into concrete decisions in your code.”