A Tech Log

September 24, 2010

Open the firewall for tomcat on Centos

Filed under: Development — adallow @ 4:05 pm

Goto prompt:

choose “Firewall configuration”
choose “Customize”
choose “Other ports” 8080:tcp
choose “Ok”
>service tomcat6 restart


Install Tomcat 6 on CentOS 5.x

Filed under: Development — adallow @ 3:31 pm

cd /etc/yum.repos.d
wget ‘http://www.jpackage.org/jpackage50.repo’
yum update
yum install tomcat6 tomcat6-webapps tomcat6-admin-webapps
service tomcat6 start

If you get a dependency then do this and do above again:

rpm -Uvh ‘http://plone.lucidsolutions.co.nz/linux/centos/images/jpackage-utils-compat-el5-0.0.1-1.noarch.rpm’

September 21, 2010

What UNix Shell am I using?

Filed under: Development — adallow @ 3:29 pm

The shell for a user is in the /etc/passwd file for that user as the last field.

Or echo the ‘SHELL’ variable on the command prompt:

echo $SHELL

December 16, 2009

Silverlight – Specify Browser or Client HTTP Handling

Filed under: Development — adallow @ 9:36 am

From MSDN : http://msdn.microsoft.com/en-us/library/dd920295%28VS.95%29.aspx

With Silverlight, you can specify whether the browser or the client provides HTTP handling for your Silverlight-based applications. By default, HTTP handling is performed by the browser and you must opt-in to client HTTP handling.

The following is a list of scenarios that you would typically specify client HTTP handling for.

  • Using HTTP methods other than GET and POST.
  • Using response status codes headers, response bodies in your application or for debugging purposes.
  • Sending XML HTTP requests such as REST and SOAP messages.
  • Manually managing cookies.

In addition to specifying whether to use browser or client HTTP handling, you can specify the scope for the handling. For example, you can specify HTTP handling for all messages, for a scheme (HTTP or HTTPS), for a particular domain, or for a single request object. Once you have specified the HTTP handling for a scheme or domain, you cannot change the HTTP handling for that domain or scheme. The following procedures describe how to specify browser or client HTTP handling, set the scope of the handling, and how to determine whether the browser or client is performing the handling for a request object.

Sivlerlight Twitter App!

Filed under: Development — adallow @ 9:32 am
Tags: ,

A sliverlight Twitter widget:


May 27, 2009

Mapping of MS-Project fields to TFS – Walkthrough

Filed under: Development — adallow @ 10:48 am

see http://developers.de/blogs/damir_dobric/archive/2008/06/23/mapping-of-ms-project-fields-to-tfs.aspx

Customizing Microsoft Project Field Mappings

Filed under: Development — adallow @ 10:02 am

From MSDN:

When publishing or refreshing tasks in Microsoft Project, there is a mapping file that specifies how the fields in each task are mapped to fields in Team Foundation. Also the mapping file controls the publishing behavior, and designates special fields that display additional information, such as the context field.

You can customize the behavior when tasks are published or refreshed. You can change which fields in Team Foundation are mapped to Microsoft Project fields. You can control if fields are only published, or both published and refreshed. And you can designate special fields that are the links and attachments, context field, and synchronization field.

The Microsoft Project Field Mapping File
Describes the Microsoft Project mapping file and explains the XML syntax with examples.

Field Mappings in Microsoft Project
Provides specific support information for understanding how Team Foundation fields and Microsoft Project fields can be mapped.

How to: Download or Upload a Microsoft Project Field Mapping File
Explains how to download or upload the Microsoft Project field mapping file for a team project.

How to: Change How Fields are Mapped to Microsoft Project
Explains how to change field mappings in the Microsoft Project field mapping file.

May 8, 2009

TFS Workitem CoreField Enum

Filed under: Development — adallow @ 11:09 am

TFS WorkItems CoreField enum can be used to access various fileds in a work item. For example

workItem.Fields[CoreField.AssignedTo].Value = "Emma Smith";

The values for this enum are as below:
CreatedBy Can be a user other than the one who is authenticated. See AuthorizedAs.
AuthorizedAs The “person name” field, used to store the name of the user who is authenticated to make the change.

April 7, 2009

Accessing Strongly Typed XML Data using XPathNavigator

Filed under: Development — adallow @ 4:56 pm
Tags: ,

As an instance of the XPath 2.0 data model, the XPathNavigator class can contain strongly-typed data that maps to common language runtime (CLR) types. According to the XPath 2.0 data model, only elements and attributes can contain strongly-typed data. The XPathNavigator class provides mechanisms for accessing data within an XPathDocument or XmlDocument object as strongly-typed data as well as mechanisms for converting from one data type to another.


April 6, 2009

Turn Auto Shrink off on all SQL Databases

Filed under: Development — adallow @ 11:21 am

DECLARE @name varchar(500)
DECLARE @sql varchar(8000)
SET @sql = ”
FROM sysdatabases
OPEN Database_Cursor
FETCH NEXT FROM Database_Cursor INTO @name
SET @sql = @sql + ‘ALTER DATABASE [‘ + @name + ‘] SET AUTO_SHRINK OFF’ + CHAR(10)

FETCH NEXT FROM Database_Cursor INTO @name
CLOSE Database_Cursor
DEALLOCATE Database_Cursor

print @sql


April 1, 2009

TSQL to Shrink All Databases on a Server

Filed under: Development — adallow @ 3:44 pm
Tags: ,
DECLARE @name varchar(500)
DECLARE @sql varchar(8000)
SET @sql = ”
FROM sysdatabases
OPEN Database_Cursor
FETCH NEXT FROM Database_Cursor INTO @name
SET @sql = @sql + ‘backup log [‘ + @name + ‘] with truncate_only’ + CHAR(10)
SET @sql = @sql +  ‘dbcc SHRINKDATABASE ( [‘ + @name + ‘] )’ + CHAR(10)

FETCH NEXT FROM Database_Cursor INTO @name

CLOSE Database_Cursor
DEALLOCATE Database_Cursor

print @sql


Moving TFS Databases

Filed under: Development — adallow @ 10:17 am

from: http://weblogs.asp.net/dmckinstry/archive/2006/12/04/moving-tfs-databases.aspx

TFS was down!  The problem appeared to be that the TFS databases were installed on the default C drive which was too small and completely out of space.  They were pretty sure they knew the answer but wanted me to verify it.  For everyone’s benefits, I’ve documented the steps we used to move the TFS-related databases from the C drive to another location.

Note that they were already at a stop-work situation so things couldn’t get too much worse.  If you need to do something similar you should approach the process gingerly.  Make sure your backups are good and realize that while you’re doing this the TFS and its related services will be unavailable.

  1. Stop TFSServerScheduler, SharePoint Timer Service & SQL Server Reporting services..
    • Right-click on “My Computer” in the start menu and select Manage.
    • Drill into Services and Applications > Services.
    • Locate and stop the aforementioned services.
  2. Stop the TFS-related Application Pools:  ReportServer, TFS AppPool, TFSWSS, and TFSWSSADMIN.  As an alternative, you may simply shut down IIS altogether if it isn’t being used for anything else on the system.  Also note that these application pools
    • Still within Computer Management, drill into Services and Applications > Internet Information Services > Application Pools
    • Right click on the aforementioned pools and select Stop.
  3. Open Microsoft SQL Server Management Studio (Start > All Programs > Microsoft SQL Server 2005 > SQL Server Management Studio) and connect to the Database Engine for your Team Foundation Server.
  4. Drill into the Databases node.
  5. Locate and Detach the TFS databases.  To do this, right-click on the database and select Tasks > Detach…  Click OK to detach the database.  You can selectively choose the individual databases that you need to move or simply move all of the following:
    • ReportServer
    • ReportServerTempDB
    • STS_Config_TFS
    • STS_Content_TFS
    • TfsActivityLogging
    • TfsBuild
    • TfsIntegration
    • TfsVersionControl
    • TFSWarehouse
    • TfsWorkItemTracking
    • TfsWorkItemTrackingAttachements
  6. Locate the database data files and transaction logs that were detached.  By default they are in the following directory: C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data.  The following database files are candidates based on the same sort order shown in the previous list:
    • ReportServer.mdf and ReportServer_log.LDF
    • ReportServerTempDB.mdf and ReportServerTempDB_log.LDF
    • STS_Config_TFS.mdf and STS_Config_TFS_log.LDF
    • STS_Content_TFS.mdf and STS_Content_TFS_log.LDF
    • TfsActivityLogging.mdf and TfsActivityLogging_log.LDF
    • TfsBuild.mdf and TfsBuild_log.LDF
    • TfsIntegration.mdf and TfsIntegration_log.LDF
    • TfsVersionControl.mdf and TfsVersionControl_log.LDF
    • TFSWarehouse.mdf and TFSWarehouse_log.LDF
    • TfsWorkItemTracking.mdf and TfsWorkItemTracking_log.LDF
    • TfsWorkItemTrackingAttachments.mdf and TfsWorkItemTrackingAttachments_log.LDF
  7. For each database, move the MDF and related LDF file from the source location to your selected destination.
  8. Return to Microsoft SQL Server Management Studio, reattach the database files in their new locations.  You can do this as follows:
    • Right-click on the Database folder and selecting Attach…
    • Click the Add button.
    • Browse to the new location and select the first MDF that you’ve moved and click OK.
    • Repeat steps 2 and 3 to select all of the database files that you’ve moved.
    • Once all of your databases are selected, click OK in the Attach Databases dialog.
    • Verify that all of the original databases shown in step 5 above are displayed under the Databases folder in SQL Server Management Studio.
    • Close SQL Server Management Studio.
  9. Restart the application pools that were shutdown in step 2.  You can use the same steps from step 2 except that you select Start from the pop-up menu instead for Stop.
  10. As a good measure, after the application pools are restarted, I restart IIS itself.  This probably isn’t necessary but I am paranoid.  If taking IIS down on your TFS server doesn’t work in your environment, skip this step.  To restart IIS, right-click on the Internet Information Services node in the computer Management console and select All Tasks > Restart IIS…  If you opted to take IIS down as a whole in step 2, now is the time to restart it.
  11. Start the services that were stopped in step 1.  This process is again the same as that given in step 1 except no you are starting services instead of stopping them.
  12. Bring up Team Explorer and verify that everything works.  Make sure you check the work items, reports and team portals to make sure everything looks good.
  13. Take a peek at the Application and System event logs and make sure that nothing unusual happened during your testing of the new environment.

March 31, 2009

TFS Excel addin problem

Filed under: Development — adallow @ 5:27 pm


Error TF84037: There was a problem initializing the Microsoft Excel Team Foundation Addin.  Re-installing the Team Foundation Client may be required.


Office 2003 .Net programmability support is not installed.  You need to modify your installed version of Office and install this option.  I thought we had a better error message for this…

1.  In Add/Remove programs, locate your Office application and select it.

2.  Click on the ‘Change’ button

3.  Select ‘Add or Remove features’ and click ‘next’

4.  Select ‘Choose advanced customization of applications’ and click ‘next’

5.  In the tree view, expand ‘Microsoft Office Excel’ and make sure the .NET Programmability Support option is set to ‘run from my computer’.

6.  Click ‘update’.

from MSDN

Jquery – jtip – tool tip pop up, good for image and text popups

Filed under: Development — adallow @ 3:32 pm


JQuery BeautyTips (tip popup)

Filed under: Development — adallow @ 3:27 pm

BeautyTips is a jQuery tooltips plugin which uses the canvas drawing element in the HTML5 spec in order to dynamically draw tooltips (sometimes called “talk bubbles” or “help balloons”) associated with a html element on the page. These tips are highly configurable and can be triggered in many different ways.


March 19, 2009

Silverlight & WPF Charts

Filed under: Development — adallow @ 2:21 pm
  • Visually Stunning Animated Charts
  • Single API for both Silverlight & WPF
  • Embed into Desktop or Web Applications
  • Tiny footprint (204 KB)
  • Dual License – Open Source & Commercial

see: http://visifire.com/

March 17, 2009

ADO.Net XML Provider

Filed under: Development — adallow @ 12:58 pm
Tags: ,

The WilsonXmlDbClient is an ADO.NET provider that enables Xml to be worked with just like any other database in .NET. It supports the most common Select, Insert, Update, and Delete SQL syntax, as well as tranactions and parameters.

Wilson.XmlDbClient is the original open source release by Paul Wilson. It includes:



Delete Workitem in TFS (including the TFS data warehouse)

Filed under: Development — adallow @ 9:13 am

taken directly from: http://bappedyanto.com/post/Delete-Work-Item-in-TFS.aspx

In TFS 2008, there’s a capability to delete unused work item. I know some people think that physically delete the work item is not needed because there are several work around to achieve it, nevertheless for the reason of tidiness everything, delete work item physically sometimes is required.

Out of the box, this feature is not available. You need to install TFS 2008 Power Tools and use the TFPT.EXE command line tools (although I believe GUI will be more than useful).


Be careful now, there’s no way to recover or undelete the work item by executing this tool.

As the description suggest, using this tool is not deleting records in datawarehouse (TFS uses SQL Server both OLTP and OLAP), only in operational database. The implication is the deleted work item will still appear in Team Reporting.

To fix this, manual deletion is required in TFS Datawarehouse database, some people will say that this practice is dangerous because potentially will break the data integrity but I think if we do it properly, the risk can be eliminated.

in SQL Management Studio, connect to TFS Database Server, and then unfold TFSWarehouse database.


Notice five tables with name related to work item. [Current Work Item], [Work Item], [Work Item Changeset], [Work Item History], and [Work Item with Result].

Query [Work Item] table to get the work item id in Datawarehouse with this SQL statement

SELECT __ID, System_Title FROM [Work Item] WHERE System_Id = workitemid

workitemid in here is the work items id that is used in TFPT command. Don’t get confused because in other 4 tables that previously noted the work item id that will be used is coming from [Work Item].__ID.

For the other 4 tables here’s the SQL statement that need to be executed

Delete [table name] where [work item] = workitem_from_[Work Item].__ID

Then rebuilt you cube by executing the OLAP Database and Warehouse Run from web services.

Disclaimer : please be very careful when conducting this procedure. I am not responsible if your TFS data is messed up

February 11, 2009

Reporting Services: Using XML and Web Service Data Sources

Filed under: Development — adallow @ 2:41 pm

This white paper consolidates general information, best practices, and tips for designing Microsoft SQL Server Reporting Services (SSRS) reports. It is intended to provide a starting point for design questions and an overview of some of the capabilities of Reporting Services. (12 printed pages)


February 6, 2009

MSBuild Project Template for Visual Studio

Filed under: Development — adallow @ 8:43 am
Tags: ,

A Visual Studio template that gives a basic framework for editing MSBuild project files from within the Visual Studio IDE, also supporting Source Control without leaving the Solution Explorer window.


February 2, 2009

Using jQuery with ASP .NET AJAX to create a cascading CheckBoxList

Filed under: Development — adallow @ 10:33 am
Tags: , ,


SQL updating a table with values from another table via a join

Filed under: Development — adallow @ 10:03 am

UPDATE dbo.geo_postcode
SET dbo.geo_postcode.geo_region_name = dbo.geo_region.geo_region_name
FROM dbo.geo_postcode
INNER JOIN dbo.geo_region
ON (dbo.geo_postcode.geo_region_code = dbo.geo_region.geo_region_code and dbo.geo_postcode.geo_country_code = dbo.geo_region.geo_country_code);

Thread Local Storage and .Net

Filed under: Development — adallow @ 9:48 am
Tags: ,

the below is taken from:


The Thread class and System. Threading namespace also contain some methods and classes for realizing thread local storage. Thread local storage is a manner of storing data in a container that is unique to the thread. Many threads could then use the same named container to store their data without concern of collision. Each thread’s local storage is distinct from another thread’s local storage and is only available in the one thread. Listing 3 shows a small sample using the thread-local-storage methods and classes.

using System;
using System.Threading;

namespace ConsoleApplication11
class Class1
public void ThreadStart()
string str1 = "My Cookie "+
Console.WriteLine("worker thread: {0}", str1);
LocalDataStoreSlot lds =
Thread.SetData(lds, str1);
LocalDataStoreSlot lds2 =
string str2 = "";
str2 = (string) Thread.GetData(lds2);
Console.WriteLine("worker thread: {0}", str2);

static void Main(string[] args)
string str1 = "My Cookie "+
Console.WriteLine("main thread: {0}", str1);
LocalDataStoreSlot lds =
Thread.SetData(lds, str1);
Class1 obj = new Class1();
Thread thread = new Thread(
new ThreadStart(obj.ThreadStart));
LocalDataStoreSlot lds2 =
string str2 = "";
str2 = (string) Thread.GetData(lds2);
Console.WriteLine("main thread: {0}", str2);

You could also create and start more than one thread and the behavior of the thread local storage becomes more obvious. I have played with Win32 thread-local-storage functions and created my own for portability to UNIX, but I have rarely found them very useful. I strongly believe in stateless computing and thread-local-storage contradicts this belief.

January 29, 2009

TFS API: Work ItemHistory

Filed under: Development — adallow @ 2:49 pm


January 27, 2009

Ordered Execution With ThreadPool

Filed under: Development — adallow @ 9:38 pm
Tags: ,

Interesting from:


“Consider a pipeline implementation that obtains parallelism benefits by having multiple stages of the pipeline active at any one time.

For example, you could have a pipeline that reads in data from a file, compresses it, encrypts it, and writes it out to a new file. The compression can be done concurrently with the encryption, but not on the same data at the same time, since the output of one needs to be the input to the other. Rather, the compression routine can compress some data and send it off to the encryption routine to be processed, at which point the compression routine can work on the next piece of data.
Since many compression and encryption algorithms maintain a state that affects how future data is compressed and encrypted, it’s important that ordering is maintained. (Never mind that this example deals with files, and it’d be nice if you could decrypt and decompress the results in order to get back the original with all of the data in the correct order.)
There are several potential solutions. The first solution is simply to dedicate a thread to each component. This DedicatedThread would have a first-in-first-out (FIFO) queue of work items to be executed and a single thread that services that queue. When the component has work to be run, it dumps that work into the queue, and eventually the thread will get around to picking up the work and executing it. Since there’s only one thread, only one item will be run at a time. And as a FIFO queue is being used, the work items will be processed in the order they were generated.”

MSBuild: Best Practices For Creating Reliable Builds, Part 1

Filed under: Development — adallow @ 4:40 pm
Tags: ,

If your using MSBuild (as we do with our TFS environment) then the following is most useful:


Team Foundation Server Power Tools – October 2008 Release

Filed under: Development — adallow @ 11:55 am


  • Command line tool (TFPT.EXE)
  • Team Explorer IDE menu additions
  • Build Notification tool
  • TFS Best Practices Analyzer
  • Process Template Editor
  • Work Item Templates
  • Custom check-in policies
  • TFS Server Manager
  • TFS Users tool
  • Alert Editor
  • TFS Power Shell Extensions
  • TFS Windows Shell Extensions
  • Team Members Tool

Download from: http://www.microsoft.com/downloads/details.aspx?familyid=FBD14EEA-781F-45A1-8C46-9F6BA2F68BF0&displaylang=en

Checking your TFS Version

Filed under: Development — adallow @ 11:52 am

see http://blogs.msdn.com/bharry/archive/2008/01/15/checking-your-tfs-version-and-extending-trials.aspx

“The program is called TFSVersionDetection.exe and is attached to this blog post (use link above). I recommend that you run the tool on the TFS server itself. You can run it from another machine and point it at the TFS server but it does a less thorough job of detection (due to permissions issues, etc). If you run it on the TFS server and press the “Check” button, you will see a screen that look something like the following.”

Visual Studio 2008 Team Foundation Server Service Pack 1

Filed under: Development — adallow @ 11:49 am


January 25, 2009

Implementing a Brand in a SharePoint Server 2007 Publishing Site

Filed under: Development — adallow @ 8:21 am


January 24, 2009

Using Telerik RadEditor as a Wiki Editor in MOSS

Filed under: Development — adallow @ 3:31 pm
Tags: ,

Source telerik:

“There have been a number of questions, regarding the RadEditor for MOSS and whether it is possible to use it in the SharePoint 2007 Wiki libraries and sites. The short answer to this question is – yes it’s possible. Here is the long version: Wiki pages in MOSS 2007 are stored as normal document libraries. This means that when you edit a Wiki page, you are actually editing a list item. RadEditor for MOSS  supports this scenario and you can use it to replace the default editor in all major browsers – Internet Explorer, Firefox, Safari, etc.

Here is how to activate the RadEditor for MOSS list items (the same guide is available in the RadEditor for MOSS documentation topic Using RadEditor in List Items):

1. You need to get the latest build of our editor. Go to this page for more info and download details – http://www.telerik.com/products/sharepoint/overview.aspx

2. Install the RadEditor for MOSS in your web farm. Installation instructions are available in the documentation, which comes with the download.

3. Browse to the SharePoint site which, where you want to use the RadEditor in list items and open the Site Settings page. From the Site Settings, navigate to Site Features.

4. Activate the RadEditor features. You can use the editor in all browsers, or you can leave the default rich text editor in Internet Explorer and use ours everywhere else. Here is a screenshot with the RadEditor features:

5. You might need to restart IIS to recycle the SharePoint web application. This step is required since MOSS will cache the default editor the first time it is used.

6. That’s it. You can now use RadEditor for MOSS to edit Wiki pages in your site. Remember that the RadEditor features are local to the site, so if you want to edit list items in a different site, you need to redo steps 3 and 4 for it.

After you have our editor up and running, you might want to customize its appearance/options. You can do that with the editor’s tools and configuration files. By default, they are located at \Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\\RadControls\Editor\ (where 4.1.0 represents the installed editor build). The files you need to modify are called ListToolsFile.xml and ListConfigFile.xml”

Removing search scope dropdown in Sharepoint (MOSS 2007) using CSS

Filed under: Development — adallow @ 3:13 pm

Open your core.css file and find this line: “select.ms-sbscopes” . This is the css class which is responsible for the search scope dropdown in MOSS 2007.

Now just add this line within the class..:


.. and you are done!

Note: If you don’t want to edit the core.css, you can also add the following line on any css file which will be loaded on the page  (or direct on the masterpage):

select.ms-sbscopes { display:none; }

(from Gee’s Blog)

How to find out which Sharepoint version you are using

Filed under: Development — adallow @ 3:12 pm

Go to Control Panel -> Add and Remove Programs. Select the product (sharepoint server) and then click: Click here for support

Now a window will pop up that displays your current sharepoint version.

How to extend the Windows Server 2008 evaluation period

Filed under: Development — adallow @ 6:48 am

Useful if your running the Virtual PC image of VS 2010 etc


TFS Branching Guide 2.0

Filed under: Development — adallow @ 6:32 am
Tags: ,

Jeff Beehler: “Selecting the right branching strategy is one of the most important aspects of TFS deployment. Picking the right strategy can lead to optimized team cooperation, increased productivity and a successful adoption. On the other hand, selecting a bad branching strategy can cause frustration, damage productivity and derail TFS adoption in an organization. We have therefore put a lot of effort in creating a set of practical guidance to educate our customers and partners and support their VSTS adoption efforts.”

You can see the guide at (came out late dec 2008):


Microsoft Pre-release Software Visual Studio 2010 and .NET Framework 4.0 Community Technology Preview (CTP)

Filed under: Development — adallow @ 6:28 am
Tags: ,

The CTP (Community Technology Preview) for Visual Studio 2010 including .Net 4.0 can be downloaded from:


January 14, 2009

Performance Anti-Patterns in Database-Driven Applications

Filed under: Development — adallow @ 10:29 am


December 19, 2008

Filed under: Development — adallow @ 6:40 pm

Small Basic is a project that’s aimed at bringing “fun” back to programming. By providing a small and easy to learn programming language in a friendly and inviting development environment, Small Basic makes programming a breeze. Ideal for kids and adults alike, Small Basic helps beginners take the first step into the wonderful world of programming.

  • Small Basic derives its inspiration from the original BASIC programming language, and is based on the Microsoft .Net platform. It is really small with just 15 keywords and uses minimal concepts to keep the barrier to entry as low as possible.
  • The Small Basic development environment is simple, yet provides powerful modern environment features like Intellisense™ and instant context sensitive help.
  • Small Basic allows third-party libraries to be plugged in with ease, making it possible for the community to extend the experience in fun and interesting ways.”

see: http://msdn.microsoft.com/en-us/devlabs/cc950524.aspx

XML Notepad 2006

Filed under: Development — adallow @ 6:31 pm

XML Notepad 2006 provides a simple intuitive User Interface for browsing and editing XML documents.  XML Notepad shows how to use some advanced features of System.XML in the .NET Frameworks 2.0.  The download includes source code. See the handy design doc that goes with it.  Features include:

  • Tree View synchronized with Node Text View for quick editing of node names and values.
  • Incremental search (Ctrl+I) in both tree and text views, so as you type it navigates to matching nodes.
  • Cut/copy/paste with full namespace support.
  • Drag/drop support for easy manipulation of the tree, even across different instances of XML Notepad and from the file system.
  • Infinite undo/redo for all edit operations.
  • In place popup multi-line editing of large text node values.
  • Configurable fonts and colors via the options dialog.
  • Full find/replace dialog with support for regex and XPath.
  • Good performance on large XML documents, loading a 3mb document in about one second.
  • Instant XML schema validation while you edit with errors and warnings shown in the task list window.
  • Intellisense based on expected elements and attributes and enumerated simple type values.
  • Support for custom editors for date, dateTime and time datatypes and other types like color.
  • Handy nudge tool bar buttons for quick movement of nodes up and down the tree.
  • Inplace HTML viewer for processing xml-stylesheet processing instructions.
  • Built-in XML Diff tool.”

See : http://blogs.msdn.com/xmlteam/archive/2006/09/05/741251.aspx

XSLT Profiler Addin for VS 2008

Filed under: Development — adallow @ 6:21 pm

XML Tools team has released the XSLT Profiler Addin for VS 2008 – a quick and reliable performance analysis profiler tool that assists in the development and debugging of XSLT documents. The XSLT Profiler Addin for VS 2008 allows developers to measure, evaluate, and target performance-related problems in XSLT code by creating detailed XSLT performance reports. The XSLT Profiler includes a wealth of useful hints for XSL and XSLT style sheet optimizations, which are essential for XSLT-based applications that demand maximum performance.

If you need to develop reliable and robust software, the XSLT Profiler is capable of detecting the performance errors and defects in coding so that they are corrected at an early stage in the development. This is essential in reducing the overall cost of developing software applications. The XSLT Profiler tool is fully integrated into Microsoft Visual Studio 2008 to provide a seamless and approachable user experience, combining several Microsoft technologies, including Microsoft XML Editor and XSLT Debugger, Visual Studio Team System, F1 (Performance Suites), and more.

For more information and download check out Microsoft Downloads site.”

see: http://blogs.msdn.com/xmlteam/archive/2008/02/07/announcing-the-xslt-profiler-addin-for-vs-2008.aspx

Picking the right MSXML Version

Filed under: Development — adallow @ 6:17 pm

Good article, the full post is long but relevant if you use MSXML, however the basic summary is below:

see: http://blogs.msdn.com/xmlteam/archive/2006/10/23/using-the-right-version-of-msxml-in-internet-explorer.aspx

  • Use MSXML 6.0 – it is “in the box” on Vista and available for download on Win2k, XP, and 2003. It has the best security, performance, reliability, and W3C conformance
  • MSXML 3.0 is our preferred “fallback” – It is installed on every OS from a fully patched Win2k SP4 installation on up, so it requires “zero-deployment” and is serviced regularly with the OS
  • MSXML 4.0 was released to the web about 5 years ago, but at this point has been superseded by MSXML 6.0 and is only intended to support legacy applications
  • MSXML 5.0 for Microsoft Office Applications is purpose-built for Office applications and isn’t intended for broad deployment. Internet Explorer 7 actually has the MSXML5 components “off-by-default” in the Internet zone so your customers will get a goldbar for each MSXML5 control on a page if your code tries to instantiate it. The best recommendation is to avoid MSXML5 in your web apps (only machines with Office 2003 or higher will have it, anyway.).

Ideally, customers should standardize on MSXML6, but as mentioned above legacy applications or zero-deployment requirements may block full migration to MSXML6 in the short run. In this case there are two tensions that need to be balanced – functionality and test costs. This essentially leads to two options:

  • Try MSXML6 and fallback to MSXML3 – MSXML6 has some improvements that aren’t in MSXML3 such as support for XSD schema, and improved stability, performance, and security. So your app may try out MSXML6 if it is on the box and then “fallback” gracefully. Just remember to test your app with MSXML6 and with MSXML3 so you aren’t surprised when you release your application. Here’s a quick example:

if (Web.Application.get_type() == Web.ApplicationType.InternetExplorer) {

var progIDs = [ ‘Msxml2.DOMDocument.6.0’, ‘Msxml2.DOMDocument.3.0’];

for (var i = 0; i < progIDs.length; i++) {

try {

var xmlDOM = new ActiveXObject(progIDs[i]);

return xmlDOM;


catch (ex) {



return null;


  • Standardize on MSXML3 with an eye towards MSXML6 in the future – This limits functionality somewhat to what is in MSXML3 but also keeps down test costs. I’ll try to post something in the future about writing MSXML3 apps that should upgrade more easily to MSXML6 (and beyond).

XML Tools in Visual Studio 2008

Filed under: Development — adallow @ 6:15 pm
Tags: ,

tooling support offered in Visual Studio 2008 that will make working with XML easier. It will cover editing XML files, working with XML schemas, debugging XSLT style sheets and extending Visual Studio by writing your own custom XML Designers.”

see http://www.code-magazine.com/Article.aspx?quickid=0712162

December 17, 2008

MSBuild Copying Files

Filed under: Development — adallow @ 4:49 pm
Tags: ,





Executing Unit Tests from MSBuild

Filed under: Development — adallow @ 4:45 pm
Tags: ,





TFS Deployer

Filed under: Development — adallow @ 4:44 pm

By way of explaination, TFS Deployer interfaces the Team Foundation Server build store with PowerShell allowing script execution to be triggered across multiple machines when a user transitions the quality indicator of a build from one state to another.


December 5, 2008

Visual Studio 2008: Visual Studio Team System Database Edition

Filed under: Development — adallow @ 1:47 pm
Tags: ,

VS Database Edition is Part of Team edition as well. check out the features here via video:


December 1, 2008

ASP.NET Performance Checklist

Filed under: Development — adallow @ 11:31 pm
Tags: ,

Design Considerations

ms998596.checkbox(en-us,MSDN.10).gif Consider security and performance.
ms998596.checkbox(en-us,MSDN.10).gif Partition your application logically.
ms998596.checkbox(en-us,MSDN.10).gif Evaluate affinity.
ms998596.checkbox(en-us,MSDN.10).gif Reduce round trips.
ms998596.checkbox(en-us,MSDN.10).gif Avoid blocking on long-running tasks.
ms998596.checkbox(en-us,MSDN.10).gif Use caching.
ms998596.checkbox(en-us,MSDN.10).gif Avoid unnecessary exceptions.


ms998596.checkbox(en-us,MSDN.10).gif Tune the thread pool by using the formula to reduce contention.
ms998596.checkbox(en-us,MSDN.10).gif Consider minIoThreads and minWorkerThreads for burst load.
ms998596.checkbox(en-us,MSDN.10).gif Do not create threads on a per-request basis.
ms998596.checkbox(en-us,MSDN.10).gif Avoid blocking threads.
ms998596.checkbox(en-us,MSDN.10).gif Avoid asynchronous calls unless you have additional parallel work.

Resource Management

ms998596.checkbox(en-us,MSDN.10).gif Pool resources.
ms998596.checkbox(en-us,MSDN.10).gif Explicitly call Close or Dispose on resources you open.
ms998596.checkbox(en-us,MSDN.10).gif Do not cache or block on pooled resources.
ms998596.checkbox(en-us,MSDN.10).gif Know your application allocation pattern.
ms998596.checkbox(en-us,MSDN.10).gif Obtain resources late and release them early.
ms998596.checkbox(en-us,MSDN.10).gif Avoid per-request impersonation.


ms998596.checkbox(en-us,MSDN.10).gif Trim your page size.
ms998596.checkbox(en-us,MSDN.10).gif Enable buffering.
ms998596.checkbox(en-us,MSDN.10).gif Use Page.IsPostBack to minimize redundant processing.
ms998596.checkbox(en-us,MSDN.10).gif Partition page content to improve caching efficiency and reduce rendering.
ms998596.checkbox(en-us,MSDN.10).gif Ensure pages are batch compiled.
ms998596.checkbox(en-us,MSDN.10).gif Ensure debug is set to false.
ms998596.checkbox(en-us,MSDN.10).gif Optimize expensive loops.
ms998596.checkbox(en-us,MSDN.10).gif Consider using Server.Transfer instead of Response.Redirect.
ms998596.checkbox(en-us,MSDN.10).gif Use client-side validation.

Server Controls

ms998596.checkbox(en-us,MSDN.10).gif Identify the use of view state in your server controls.
ms998596.checkbox(en-us,MSDN.10).gif Use server controls where appropriate.
ms998596.checkbox(en-us,MSDN.10).gif Avoid creating deep hierarchies of controls.

Data Binding

ms998596.checkbox(en-us,MSDN.10).gif Avoid using Page.DataBind.
ms998596.checkbox(en-us,MSDN.10).gif Minimize calls to DataBinder.Eval.


ms998596.checkbox(en-us,MSDN.10).gif Separate dynamic data from static data in your pages.
ms998596.checkbox(en-us,MSDN.10).gif Configure the memory limit.
ms998596.checkbox(en-us,MSDN.10).gif Cache the right data.
ms998596.checkbox(en-us,MSDN.10).gif Refresh your cache appropriately.
ms998596.checkbox(en-us,MSDN.10).gif Cache the appropriate form of data.
ms998596.checkbox(en-us,MSDN.10).gif Use output caching to cache relatively static pages.
ms998596.checkbox(en-us,MSDN.10).gif Choose the right cache location.
ms998596.checkbox(en-us,MSDN.10).gif Use VaryBy attributes for selective caching.
ms998596.checkbox(en-us,MSDN.10).gif Use kernel caching on Microsoft® Windows Server™ 2003.

State Management

ms998596.checkbox(en-us,MSDN.10).gif Store simple state on the client where possible.
ms998596.checkbox(en-us,MSDN.10).gif Consider serialization costs.

Application State

ms998596.checkbox(en-us,MSDN.10).gif Use static properties instead of the Application object to store application state.
ms998596.checkbox(en-us,MSDN.10).gif Use application state to share static, read-only data.
ms998596.checkbox(en-us,MSDN.10).gif Do not store single-threaded apartment (STA) COM objects in application state.

Session State

ms998596.checkbox(en-us,MSDN.10).gif Prefer basic types to reduce serialization costs.
ms998596.checkbox(en-us,MSDN.10).gif Disable session state if you do not use it.
ms998596.checkbox(en-us,MSDN.10).gif Avoid storing STA COM objects in session state.
ms998596.checkbox(en-us,MSDN.10).gif Use the ReadOnly attribute when you can.

View State

ms998596.checkbox(en-us,MSDN.10).gif Disable view state if you do not need it.
ms998596.checkbox(en-us,MSDN.10).gif Minimize the number of objects you store in view state.
ms998596.checkbox(en-us,MSDN.10).gif Determine the size of your view state.

HTTP Modules

ms998596.checkbox(en-us,MSDN.10).gif Avoid long-running and blocking calls in pipeline code.
ms998596.checkbox(en-us,MSDN.10).gif Consider asynchronous events.

String Management

ms998596.checkbox(en-us,MSDN.10).gif Use Response.Write for formatting output.
ms998596.checkbox(en-us,MSDN.10).gif Use StringBuilder for temporary buffers.
ms998596.checkbox(en-us,MSDN.10).gif Use HtmlTextWriter when building custom controls.

Exception Management

ms998596.checkbox(en-us,MSDN.10).gif Implement a Global.asax error handler.
ms998596.checkbox(en-us,MSDN.10).gif Monitor application exceptions.
ms998596.checkbox(en-us,MSDN.10).gif Use try/finally on disposable resources.
ms998596.checkbox(en-us,MSDN.10).gif Write code that avoids exceptions.
ms998596.checkbox(en-us,MSDN.10).gif Set timeouts aggressively.

COM Interop

ms998596.checkbox(en-us,MSDN.10).gif Use ASPCOMPAT to call STA COM objects.
ms998596.checkbox(en-us,MSDN.10).gif Avoid storing COM objects in session state or application state.
ms998596.checkbox(en-us,MSDN.10).gif Avoid storing STA components in session state.
ms998596.checkbox(en-us,MSDN.10).gif Do not create STA components in a page constructor.
ms998596.checkbox(en-us,MSDN.10).gif Supplement classic ASP Server.CreateObject with early binding.

Data Access

ms998596.checkbox(en-us,MSDN.10).gif Use paging for large result sets.
ms998596.checkbox(en-us,MSDN.10).gif Use a DataReader for fast and efficient data binding.
ms998596.checkbox(en-us,MSDN.10).gif Prevent users from requesting too much data.
ms998596.checkbox(en-us,MSDN.10).gif Consider caching data.

Security Considerations

ms998596.checkbox(en-us,MSDN.10).gif Constrain unwanted Web server traffic.
ms998596.checkbox(en-us,MSDN.10).gif Turn off authentication for anonymous access.
ms998596.checkbox(en-us,MSDN.10).gif Validate user input on the client.
ms998596.checkbox(en-us,MSDN.10).gif Avoid per-request impersonation.
ms998596.checkbox(en-us,MSDN.10).gif Avoid caching sensitive data.
ms998596.checkbox(en-us,MSDN.10).gif Segregate secure and non-secure content.
ms998596.checkbox(en-us,MSDN.10).gif Only use Secure Sockets Layer (SSL) for pages that require it.
ms998596.checkbox(en-us,MSDN.10).gif Use absolute URLs for navigation.
ms998596.checkbox(en-us,MSDN.10).gif Consider using SSL hardware to offload SSL processing.
ms998596.checkbox(en-us,MSDN.10).gif Tune SSL timeout to avoid SSL session expiration.

Deployment Considerations

ms998596.checkbox(en-us,MSDN.10).gif Avoid unnecessary process hops.
ms998596.checkbox(en-us,MSDN.10).gif Understand the performance implications of a remote middle tier.
ms998596.checkbox(en-us,MSDN.10).gif Short-circuit the HTTP pipeline.
ms998596.checkbox(en-us,MSDN.10).gif Configure the memory limit.
ms998596.checkbox(en-us,MSDN.10).gif Disable tracing and debugging.
ms998596.checkbox(en-us,MSDN.10).gif Ensure content updates do not cause additional assemblies to be loaded.
ms998596.checkbox(en-us,MSDN.10).gif Avoid XCOPY under heavy load.
ms998596.checkbox(en-us,MSDN.10).gif Consider precompiling pages.
ms998596.checkbox(en-us,MSDN.10).gif Consider Web garden configuration.
ms998596.checkbox(en-us,MSDN.10).gif Consider using HTTP compression.
ms998596.checkbox(en-us,MSDN.10).gif Consider using perimeter caching.

Patterns and Practices home

.Net 2.0 and Config MaxConnection Values

Filed under: Development — adallow @ 11:15 pm
Tags: ,

Nearly all microsoft.com Web sites have ASP.NET applications that make calls to remote Web service clusters. The maximum number of concurrent remote Web service calls that can be made from a single Web server is determined by the maxConnection attribute of the <connectionManagement> element in the machine.config file. In ASP.NET 1.1, by default the maxConnection value was set to 2. This old default maxConnection value was much too low for sites like microsoft.com that have hundreds of different applications that make remote Web service calls. The result was that ASP.NET requests would queue while waiting for the remote Web service calls to complete. (You can view the number of queued ASP.NET requests via the perfmon counter ASP.NET\Requests Queued.) To enable more calls to execute concurrently to a remote Web service (and thereby improve the performance of applications on the site), we increased the maxConnection value to 40 for our quad processor Web servers. (The general recommended value for maxConnection is 12 times the number of CPUs, but tune this to suit your specific situation.)
In ASP.NET 2.0, however, you no longer need to configure maxConnection manually as it is now automatically scaled and set. This is a result of the new configuration section for the processModel tag in machine.config (for more information about the processModel element, see “processModel Element (ASP.NET Settings Schema))”.

    <processModel autoConfig="true" />
With autoConfig enabled in machine.config (this is the default setting), ASP.NET sets the value of the maxConnection parameter to 12n (where n is the number of CPUs). Enabling autoConfig also causes the following: the maxWorkerThreads parameter and the maxIoThreads parameter are set to 100, the minFreeThreads parameter is set to 88n, the minLocalRequestFreeThreads parameter is set to 76n, and the minWorkerThreads is set to 50.
Prior to making use of autoConfig in ASP.NET 2.0 to automatically scale and set values for maxConnection and the other attributes in the list, be sure to remove any manually set values for these parameters as these values would be used instead of the autoConfig values. This is something to keep in mind when migrating from ASP.NET 1.1 (where maxConnection needed to be explicitly set) to ASP.NET 2.0, where there are defaults.
Again, the autoConfig values for maxConnection and the other attributes listed previously are somewhat arbitrary and may not work for absolutely every instance, but I have found that these limits work well for nearly all microsoft.com applications.
If you decide that you need to tune the maxConnection value manually, be cautious when increasing its value as this can lead to an increase in CPU utilization. This increase is caused by the fact that more incoming requests can be processed by ASP.NET instead of having them wait for their turn to call the Web service. Of course, you should remember that the maxConnection attribute does not affect local Web service calls, only remote calls.
Interesting I came across this code fragment, wonder if it works….
System.Net.ServicePointManager.DefaultConnectionLimit=<your value here>

November 26, 2008

Visual C++ 2008 Feature Pack

Filed under: Development — adallow @ 4:33 pm

The Feature Pack provides several exciting features for C++ developers, such as a major update to MFC and an implementation of TR1.  Using the included MFC components, developers can create applications with the “look & feel” of Microsoft’s most popular products – Microsoft Office, Visual Studio and Internet Explorer.  New components include the Office 2007 Ribbon Bar, Visual Studio docking and auto hide windows, Vista theme support, “on the fly” menu and toolbar customization, Shell management classes and much more.  Our implementation of TR1 contains a number of important features such as smart pointers, regular expression parsing, containers (tuple, array, unordered set, etc) and sophisticated random number generators.

This product is a freely available download to any Visual Studio 2008 Standard or above customer and is fully covered under Microsoft’s standard support policies.  

You may also want to take a look at the online documentation and walkthroughs for both MFC and TR1.  The MFC documentation provides some great content to get you up and running quickly with the new components. “



New ASP.NET Charting Control for .Net 3.5

Filed under: Development — adallow @ 4:31 pm
Tags: ,

Scott Gu has posted about a new free ASP.Net 3.5 Charting Control that you can downlaod from:


It looks pretty good:



November 18, 2008

Drools.NET is a Business Rules Engine (BRE)

Filed under: Development — adallow @ 11:39 pm
Tags: ,

Drools.NET is a Business Rules Engine (BRE) based on Charles Forgy’s Rete algorithm. Developers can now exploit a powerful Rule Engine through a completely managed .NET code base. Drools.NET is based on Jboss Rules, and comes with all the features of that Rules Engine.

Drools can be used in place of the WWF rules engine if required.

see http://droolsdotnet.codehaus.org/

C9 Video – TFS Power Toys

Filed under: Development — adallow @ 11:37 pm
A closer look at tfs power toys:

More new toys:

C9 Video – Better Project Management with Team Foundation Server

Filed under: Development — adallow @ 11:30 pm

TFS / Project Server 2007 Connector Video

Filed under: Development — adallow @ 11:17 pm
Tags: ,

November 14, 2008

Sharepoint: useful JavaScript variables

Filed under: Development — adallow @ 12:49 pm

below is from: http://webborg.blogspot.com/2008/07/couple-of-useful-javascript-global.html

L_Menu_BaseUrl – the base URL of the site / subsite. Very useful when you need to determine the absolute path of the site in JavaScript. Example: document.location = L_Menu_BaseUrl + ‘lists/calendar/allitems.aspx’ //redirects to Calendar list

L_Menu_LCID – the LCID of the site you’re in. Useful if you need to determine the language of the site. The list of Locale IDs can be found here. I’m using the LCID for localizations in ERTE project. See the example of checking LCID below:

L_Menu_SiteTheme – the name of the theme applied to the site.

There is one more useful variable, but this one can’t be used on custom master pages that you created. This one is used in the SharePoint’s default pages:

_spUserId – the ID of the logged in user.

Using .img or .iso files

Filed under: Development — adallow @ 10:02 am

Some downloads come in the for of a single .iso or .img file.

Common utilities for writing ISO file to recordable media such as DVD-R include Nero, and Roxio. The contents of image files can be used as virtual discs using utilities such as ISObuster, Daemon Tools or Virtual CloneDrive for Windows Vista

TFS: Creating Custom Work Item Controls with .Net

Filed under: Development — adallow @ 9:58 am



TFS: Changing email notifications to link to Team System Web Access

Filed under: Development — adallow @ 9:57 am

from: http://msmvps.com/blogs/vstsblog/archive/2007/08/31/changing-tfs-email-notifications-to-link-to-team-system-web-access.aspx

  1. On the TFS app tier open the folder:
    %ProgramFiles%\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\Services\v1.0\Transforms
  2. Create a backup of the file WorkItemChangedEvent.xsl, which we will be editing in the next step.
  3. Replace the text:

    <xsl:value-of select=”DisplayUrl” />


    <xsl:value-of select=”concat(substring-before(DisplayUrl,’:8080/WorkItemTracking/WorkItem.aspx?artifactMoniker=’),’:8090/wi.aspx?id=’,substring-after(DisplayUrl,’artifactMoniker=’))” />

    The bold printed 8090 is the port where you installed TSWA at.

  4. Save the file and you are done.

If you now get a new notification e-mail and click on the link you’ll see the following much nicer work item details form provided by TSWA:

Team System Web Access Work Item Detail Form

TFS: SDK Online Doco

Filed under: Development — adallow @ 9:54 am

From the contents:

  • Team Foundation Server Extensibility
  • Team Foundation Server SDK Architecture
  • How to: Run Team Foundation Server SDK Samples
  • Team Foundation Core Services
  • Work Item Tracking Extensibility
  • Source Control Extensibility
  • Data Warehouse Extensibility
  • Reference for Team Foundation Server SDK

Link: http://msdn2.microsoft.com/en-us/library/bb130146(VS.80).aspx

MOSS 2007 Feature review at CMS Matrix

Filed under: Development — adallow @ 8:46 am


How to Create a MOSS 2007 VPC Image

Filed under: Development — adallow @ 8:41 am
Part 1: Getting Started, Installing IIS, and Installing .NET Framework 2.0
Part 2: Installing and Configuring POP3 Email
Part 3: Installing and Configuring Outlook 2007
Part 4: Installing and Configuring the .NET Framework
Part 5: Installing SQL Server 2005
Part 6: Configuring SQL Server 2005
Part 7: Installing SQL Server 2005 SP1
Part 8: Creating the MOSS Accounts
Part 9: Installing and Configuring the MOSS 2007 Application
Part 10: Setting Up Internet Explorer Web Browser Security
Part 11: Starting Services
Part 12: Creating a Shared Services Provider
Part 13: Configuring Search Settings
Part 14: Configuring Outgoing E-mail
Part 15: Creating the Portal
Part 16: Installing SharePoint Designer 2007
Part 17: Installing Office 2007 Applications
Part 18: Installing Warm-up Scripts
Part 19: Optimizing the MOSS 2007 VPC Image
Part 20: Creating a Virtual PC Differencing Disk

Websites as Graphs

Filed under: Development — adallow @ 8:40 am

“Everyday, we look at dozens of websites. The structure of these websites is defined in HTML, the lingua franca for publishing information on the web. Your browser’s job is to render the HTML according to the specs (most of the time, at least). You can look at the code behind any website by selecting the “View source” tab somewhere in your browser’s menu.

HTML consists of so-called tags, like the A tag for links, IMG tag for images and so on. Since tags are nested in other tags, they are arranged in a hierarchical manner, and that hierarchy can be represented as a graph. I’ve written a little app that visualizes such a graph, and here are some screenshots of websites that I often look at.”

from: http://www.aharef.info/2006/05/websites_as_graphs.htm

app: http://www.aharef.info/static/htmlgraph/

November 13, 2008

Migrating data from SQL Server 2000 to SQL Server 2005

Filed under: Development — adallow @ 11:28 pm

An article by Microsoft, covers some the high-level information on migrating from SQL 2000 to 2005


In particular the following section was useful for me:

The database engine upgrade is the easiest upgrade and will result in immediate return on investment in the areas of management, performance, and high availability. Again, the two main options for the database engine upgrade are side-by-side migration (in which you install the SQL Server 2005 engine as a secondary instance on the same server as your SQL Server 2000 or 7.0 server or on a completely separate server) and an in-place upgrade (in which you upgrade an instance of SQL Server 2000 or 7.0 through the install process and databases and other objects are upgraded “in place”).

With a side-by-side migration, the most common upgrade path is a simple database detach and re-attach on the SQL Server 2005 instance or a database backup and restore from the older version to the new version. If you keep an up-to-date version of your metadata scripts, you can also create the objects on the SQL Server 2005 server and use BCP to export and import your data. The other option is an in-place upgrade, in which you upgrade and adapt the databases, settings, and extended features to the SQL Server 2005 engine during the install process. When you run the setup process on a server that has a SQL Server 2000 or 7.0 instance, you’ll see an option to upgrade the selected instance to SQL Server 2005.

Note that for the database engine upgrade, all your existing Microsoft Data Access Components (MDAC) and ADO.NET applications will continue to function as when they were running against SQL Server 2000 or 7.0. In fact, SQL Server 2005 doesn’t come with a newer release of MDAC. But new to the platform is the SQL Native Client, combining an updated SQL ODBC driver and SQL OLEDB provider with network libraries in a single DLL. The SQL Native Client lets you leverage SQL Server 2005’s new client-access features, such as Multiple Active Result Sets (MARS), the XML data type, and user-defined types (UDTs). SQL Server comes with tight integration with the .NET Framework 2.0, which includes the latest ADO.NET version.

The in-place server upgrade will be the easiest. Although this approach requires a more thorough fallback plan and testing, you reap the rewards through seamless connectivity. By performing an in-place upgrade, logins and users remain in-sync, database connections remain the same for applications, and SQL Agent jobs and other functionality is concurrently upgraded during the installation. Note that several features, such as log shipping, replication, and cluster environments, have special upgrade considerations.

As noted earlier, for the database engine, the upgrade sets the compatibility mode to 8.0. You might benefit from leaving this setting at 8.0 under certain circumstances, such as for T-SQL references that are no longer supported in SQL Server 2005. I’ve run across some query hints that require rewriting, for example, as well as some legacy ANSI join syntax that’s being phased out (the *= left outer join syntax in particular). The analysis phase of your upgrade will uncover situations where using a lower compatibility setting might apply. However, I recommend that you fix any syntax that requires a lower compatibility level than 9.0 (SQL Server 2005) during the upgrade process. By reworking the syntax, your developers will have immediate access to all the new programming enhancements and features in the release. One quick trick to isolating these type issues and other syntax that might cause upgrade trouble is to script out the objects and procedures from the earlier platform version and attempt to run the scripts within SQL Server 2005. A simple attach or restore might suppress these issues. Also remember that some SQL logic can be embedded in your application. For data validation, running DBCC checkdb on your attached or restored database will confirm the integrity of the migrated data.

One caution: You probably have developers who are adept at leveraging system objects to make their lives easier. Microsoft has always told us to use Information_Schema views to get various metadata instead of querying the system tables directly because Microsoft can’t guarantee that the underlying object structure will persist in new platforms. With the new release, Microsoft has changed SQL Server’s underlying object structure. Also note that SQL Server 2005 catalog views and Dynamic Management Views (DMVs) have restricted permissions. PUBLIC users no longer have permissions to view catalog views, and users with GUEST/PUBLIC permissions can’t select from DMVs.

Using VS2008 to Target .NET Framework 2.0 with ASP.NET AJAX

Filed under: Development — adallow @ 11:21 pm
Tags: ,

from: http://blogs.msdn.com/brada/archive/2007/12/19/using-vs2008-to-target-net-framework-2-0-with-asp-net-ajax.aspx

VS 2008 fully supports building applications for .NET Framework 2.0…   This is very important as it will take time for some hosters and IT organizations to fully deploy .NET Framework 3.5, but you don’t want that to block you from taking full advantage of the cool features in VS 2008.

Today we released ASP.NET 2.0 AJAX Templates for VS2008.  This release contains project templates for using Visual Studio 2008 or Visual Web Developer 2008 to create new web sites and web applications with ASP.NET AJAX Extensions features. The project templates contain specific references to assemblies in .NET Framework 2.0 and ASP.NET 2.0 AJAX Extensions 1.0.

Download the ASP.NET 2.0 AJAX Templates for VS2008!

To try these out, make sure you have ASP.NET AJAX Extensions installed, then install the ASP.NET AJAX Templates for Visual Studio 2008.

Then, go to File->New Project and select .NET Framework 2.0 as the target runtime.  That will filter down the options and you should see “AJAX 1.0-Enabled ASP.NET 2.0 Web Application”.  Select it.


Notice the assembly reference in web.config is fixed up to be the 1.0 version number…

        <add tagPrefix="asp" namespace="System.Web.UI" 
             assembly="System.Web.Extensions, Version=1.0.61025.0, ...

Processing Collections Using .Net Rules Engine

Filed under: Development — adallow @ 11:18 pm
Tags: ,

Using the rules engines’ chaining behaviour it’s possible to loop through a collection of items and execute a rule for each item in the collection.

E.g. I created a spam filter that uses the rules engine to check for keywords in an email. Instead of creating a separate rule for each keyword you can just store all the keywords in a collection and use the chaining behaviour of the rules engine to loop through the collection executing a rule for each keyword.

To do this i followed a pattern taken from MSDN: Processing Collections In Rules

Rule 1 (Priority = 2) //Always execute this rule once to create the enumerator.
IF 1==1
THEN this.enumerator = this.myCollection.GetEnumerator()
Rule 2 (Priority = 1)
IF this.enumerator.MoveNext()
THEN this.currentInstance = this.enumerator.Current
Rules 3-N (Priority = 0)
…. //Additional rules written against this.currentInstance
Rule N+1 (Priority = -1)
// can be any condition as long as it is evaluated every time;
// this.currentInstance will be evaluated each time this.currentInstance changes, whereas
// “1==1” would only be evaluated once.
IF this.currentInstance == this.currentInstance


Update(“this/enumerator”) //this will cause Rule 2 to be reevaluated

In my spam filter example I had 4 rules which did the following:

  1. Get the enumerator for my collection (List<string>) of spam words
  2. Move the enumerator to the next spam word, and set current spam word variable.
  3. Check if the email contains the current spam word
  4. Update enumerator, so that rule 2 will be re-evaluated (due to chaining behaviour of the rules engine).

Windows Workflow Foundation Rules Engine

Filed under: Development — adallow @ 11:17 pm
Tags: ,

With .Net 3.0 or later there is the ‘Windows Workflow Foundation’ which includes the Rules Engine.

Using the rules engine you can create an external set of rules and execute them against any .Net object.

from http://blogs.microsoft.co.il/blogs/bursteg/archive/2006/10/11/RuleExecutionWithoutWorkflow.aspx

Create a RuleSet

The RuleSet Editor Dialog is exposed as part of the API, so you can use it to create RuleSets as part of your program:

// Create a RuleSet that waorks with Orders (just another .net Object)

RuleSetDialog ruleSetDialog = new RuleSetDialog(typeof(Order), null, null);

// Show the RuleSet Editor


// Get the RuleSet after editing

RuleSet ruleSet = ruleSetDialog.RuleSet;

Serialize and Deserialize rules

Windows Workflow Foundation uses the WorkflowMarkupSerializer to Serialize and Deserialize rules.

// Serialize to a .rules file

WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer();

XmlWriter rulesWriter = XmlWriter.Create(fileName);

serializer.Serialize(rulesWriter, ruleSet);


// Deserialize from a .rules file.

XmlTextReader rulesReader = new XmlTextReader(fileName);

WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer();

ruleSet = (RuleSet)serializer.Deserialize(rulesReader);


Execute RuleSet againt an object

Execute your RuleSet after editing, serializing and deserialising it, but first validate that the rules can be executed against the input object.

// Execute the rules and print the entity’s properties

Order myOrder = new Order(…);

RuleValidation validation = new RuleValidation(typeof(Order), null);

RuleExecution execution = new RuleExecution(validation, myOrder);


An Introduction to WWF and rules engine is available here:


includes useful information about chainging:

Each rule in a RuleSet has a priority value with a default of 0. The rules in a RuleSet can be considered a sorted collection, ordered by the priority values. The WF Rules evaluator evaluates rules individually and executes the rule’s actions based on the results of the rule’s condition evaluation

A selection of examples are available from


Free .NET component for asynchronous file upload

Filed under: Development — adallow @ 11:15 pm

Flajaxian FileUploader is .NET web control designed for asynchronous file upload of multiple files at the same time, without a page post back and with a progress bar indicating the current upload progress. This control does not require full trust environment. The control can be extended with the addition of server side and client side adapters. Flajaxian FileUploader uses Adobe Flash Player 8 or higher Flash player for the file upload.


SQL Server Locking : NOLOCK and ROWLOCK

Filed under: Development — adallow @ 11:14 pm

SQL Server requires (READ) locks for reading from the database (select queries).
For Updates (WRITE) locks are used.
SQL Server starts with row-level locks, but often escalates these to page and table locks, causing deadlocks.

Using NOLOCK tells SQL Server to ignore locks and read directly from the tables. This means you don’t have to worry about locks, however you may read data that is not yet committed (i.e. in the Process of being updated, and not yet committed, or worse yet was int he process of being updated, but then the transaction doing the writing rolls back, so you read data that was never there). Obviously only use NOLOCK when you can deal with these consequences (e.g. it might not be a good idea in an Accouting system, but may be fine for a CMS style site).

Using ROWLOCK, means that the lock type won’t esclated up to page or table locks (which would have effected more records than just those being updated). Instead locks will always be at the ROW level.

WHERE Name LIKE ‘Smith’


SET Name = ‘Albert’ WHERE Name= ‘Bert’

Connect To Mainframe Apps With BizTalk Adapters and .NET

Filed under: Development — adallow @ 11:12 pm

Interesting article on connecting to Mainframe apps via Biztalk/.Net:


SharePoint web part to ASP.NET web user control

Filed under: Development — adallow @ 11:04 pm

SmartPart is a SharePoint web part which can host any ASP.NET web user control. The project is on codeplex:



Connecting Project Server 2007 to TFS

Filed under: Development,Enterprise & Application Architecture — adallow @ 12:42 pm
Tags: ,

There is an open source project on codeplex that provides a connector between ProjectServer and TFS. We are big users of TFS and are thinking about extending our PM function with ProjectServer so this could be very useful going forwards.

See: http://www.codeplex.com/pstfsconnector

JQuery now comes with Visual Studio and has VS intellisense!

Filed under: Development — adallow @ 12:31 pm

VS2008 SP1 supports JQuery intellisense. We are using JQuery a bit, the JSONP support is really good and helps us with our cross domain scripting.

Re intellisense see:


Sharepoint WIKI: Uploading and using images in Wiki pages

Filed under: Development — adallow @ 12:19 pm
Tags: ,

“Uploading images to a Wiki might seem like a simple operation, but there are a few tricks to remember.

  1. You need to have your images uploaded to an image library on SharePoint.
  2. You will need to provide the path for that image, so grab the path before you navigate to your wiki to add.
  3. It works best if the name of your image library is one word, not separated by underscores or spaces. So “Images1” is better than “Images for my wiki.”

Once you have created the image library for the images that you want in your wiki, navigate to your wiki page and click the image icon.

You’ll be asked to provide alternate text and the URL. Use the full path to your image, which will be something like ‘http://sharepoint/sites/<site name>/<name of image library>/<name of image>.jpg. It will vary depending on how your administrator has set up the original path (the stuff before <site name>). Confused about the path to your image? You can view the path by right clicking on the image and selecting Properties. There may be extra characters in there. Ignore them, those _t’s and others.”

from: http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?List=8d9e2a99%2Df288%2D47c2%2D916b%2D2f32864f7b82&ID=32

November 12, 2008

TFS: Branching and Merging Video

Filed under: Development,Enterprise & Application Architecture — adallow @ 9:59 am
Tags: ,

“The ability to branch and merge source code with Visual Studio Team Foundation Server can really enable a team to build software in a more agile and maintainable manner. But choosing the best branching strategy can be a bit overwhelming at first. In this interview we ask Doug Neumann, Group Program Manager for Team Foundation Server, to give us a Branching and Merging primer.” (from MS channel 9)

see the video guidance: http://channel9.msdn.com/posts/Rory/Branching-101-with-Doug-Neumann-Visual-Studio-Team-Foundation-Server/

November 11, 2008

Mono at Version 2.0

Filed under: Development — adallow @ 11:29 am
Tags: ,

I have a soft spot for Mono having used it a bit a few years ago (and first looking at it in 2001). Anyway a lot of progress has been made. Great for writing .Net apps in a MAC or Linux world:

John BouAntoun has posted about Mono going to Version 2 with ASP.Net 2 support as well as C#3.0

see: http://jbablog.com/2008/10/mono-goes-20/

Sticky Sessions, Load Balancing, Failover and Availability

Filed under: Development,Enterprise & Application Architecture — adallow @ 11:21 am
Tags: ,

All HTTP load balancers support “sticky sessions”: Requests in the same session must be forwarded to the same server node unless there is a failover. You must turn on sticky sessions in your setup. In an ideal world, all nodes in a replicated cluster have the same state; thus, the load balancer can forward any request to any node. But in a real cluster, the network and CPU resources are limited. It takes time to actually replicate the state from node to node. Without sticky sessions, the user gets random HTTP 500 errors when the request hits a node that does not yet have the latest replicated state.

fromjboss doco with some minor editing on my part to keep it just at the concept level.

ASP.Net 2.0 Security Deployment Review Guide

Interesting guide/checklist if your looking to do a security review for your ASP.Net deployments:

“This How To shows you how to perform a security deployment review for an ASP.NET 2.0 application to identify potential security vulnerabilities introduced by inappropriate configuration settings. The majority of the review process involves making sure that correct configuration settings are applied to the machine-level Web.config file and your application-specific Web.config file.

  • Learn what’s new in ASP.NET 2.0 security configuration.
  • Review ASP.NET 2.0 configuration settings to improve security.
  • Learn about the new special directories in ASP.NET 2.0, and their security implications.
  • Learn how to lock down your machine-level settings.
  • Learn how to configure <machineKey> for a Web farm scenario.
  • Learn how to encrypt a connection string in a Web farm scenario.
  • Learn how to use obfuscation with ASP.NET 2.0.



Silverlight 2 has been offically released!

Filed under: Development — adallow @ 5:59 am

In mid Oct 2008 Silverlight 2 was fully and offically released. see:


Linq2SQL (L2S) has been ‘depreicated’ in favour of LINQ to Entities

Filed under: Development — adallow @ 5:37 am
Tags: ,

As of .NET 4.0, LINQ to Entities will be the recommended data access solution for LINQ to relational scenarios, as opposed to Linq2Sql

Interesting for us as we use Linq2Sql in some cases so we will change our raodmap.



Intellisense for SQL 2005/2008

Filed under: Development — adallow @ 4:48 am
Tags: ,

SQL Server 2008 has intellisense built in.

If you need intellisense for SQL Server 2005 you can use a 3rd party product from Redgate called ‘SQL Prompt’ an example is below:

November 10, 2008

Deploying ASP.NET MVC on ASP.NET 2.0

Filed under: Development — adallow @ 12:01 pm
Tags: ,

Scott Hansleman has an interesting post on deploying ASP.Net MVC on .Net 2 (normally .Net 3.5 sp1 is required), although I am not sure if I would do it in production:


TFS: Work Item Hierarchy using a custom control

Filed under: Development — adallow @ 11:50 am

This TFS Custom control for Work Items (requires SP1) allows setting a parent work item, displays parent work item as well as a child hierarchy and prevents closing a parent when any child work items are not closed.



Filed under: Development — adallow @ 11:48 am
Tags: ,

An initial implementation, capable of executing simple WIQL queries against the Work Item Store of a TFS server:


TFS to Heat ITSM

Filed under: Development — adallow @ 11:45 am

Early stages, but there is a release, and it could be a useful base to start from:


TFS: Process Customisation

Filed under: Development — adallow @ 11:36 am

customise and edit work items and process templates (add/edit fields):


TFS: Getting workitem history from the api

Filed under: Development — adallow @ 11:14 am

First get the workitem in code (as per TFS code samples) then:

foreach(Revision rev in wrkitem.Revisions)


foreach(Field f in rev.Fields)


Console.WriteLine(“{0} = {1}\n”,f.Name,f.Value);



There is also the OriginalValue property on fields as an alternative (for some styles of history access):

foreach(Field f in rev.Fields)
if(!Object.Equals(f.Value, f.OriginalValue))
Console.WriteLine(“{0}: {1} -> {2}”, f.Name, f.OriginalValue, f.Value);

November 4, 2008

TFS: Scrum for Team System Track Actual Worked Hours

Filed under: Development — adallow @ 12:53 am
Tags: ,

DylanSmith had an interesting forum comment on the SFTS website

He tracks actual time using the SFTS template through appropriate use of the Estimated Effort and Work Remaining fields.  The idea is that if you want to enter X hours of actual time against a SBI you have to decrease the Work Remaining by Y and/or increase the Estimated Effort by Z such that Y+Z == X.

For example, lets say I had an SBI with an Estimated Effort (EE) of 5 hours, and a Work Remaining (WR) of 5 hours.

Day 1: Actual time spent on SBI is 3 hours.  Change WR to 2.  (Y = 3, Z = 0, Y+Z = 3).

Day 2: Actual time spent on SBI is 3 more hours, and I’m still not complete, probably about 1.5 hours remaining still on this SBI.  Change WR to 1.5, Change EE to 7.5 (Y = 0.5, Z = 2.5, Y+Z = 3).

Using this method I can report on actual time, it is simply EE – WR.

November 3, 2008

TFS: Scrum for team system, why some reports don’t seem to work.

Filed under: Development — adallow @ 11:33 pm
Tags: , ,

from the SfTS website:

Here are some standard reasons why the reports do not appear to work:

  • Warehouse Syncronisation
    The Scrum for Team System reports are generated by SQL Reporting server which uses the TFS warehouse database as it’s data source. By default, the warehouse database is only updated with the work item tracking data every hour. This means that it will take at least an hour before changes made to work items are reflected in the reports.
  • Overnight Update
    Some reports plot lines using the delta between days, so no data will be visible until the following day.
  • No Sprint Data
    Sprints must have a start and end date before they can be viewed in reports.

SSIS: Execute Process Task (call a command line app)

Filed under: Development — adallow @ 12:07 pm

from the MSDN doco:

The Execute Process task runs an application or batch file as part of a SQL Server 2005 Integration Services (SSIS) package workflow. Although you can use the Execute Process task to open any standard application, such as Microsoft Excel or Microsoft Word, you typically use it to run business applications or batch files that work against a data source. For example, you can use the Execute Process task to expand a compressed text file. Then the package can use the text file as a data source for the data flow in the package. As another example, you can use the Execute Process task to run a custom Visual Basic application that generates a daily sales report. Then you can attach the report to a Send Mail task and forward the report to a distribution list.

When the Execute Process task runs a command-line application, it provides input to the application through a variable that you specify in a property setting. The Execute Process task also includes properties for specifying the variables that consume the standard output and error output of the application. For more information about variables, see Integration Services Variables and Using Variables in Packages.

The Execute Process task can specify the command prompt arguments that the executable file or batch file requires. For example, if the task opens a document in Word, the command prompt argument can name the .doc file. You can use multiple command arguments in one task by using spaces to delimit arguments.

Additionally, you can configure the Execute Process task to specify a working directory, a time-out period, or a value to indicate that the executable ran successfully. The task can also be configured to fail if the return code of the executable does not match the value that indicates success, or if the executable is not found at the specified location.

see: http://msdn.microsoft.com/en-us/library/ms141166(SQL.90).aspx

SSIS: do so much with WMI Data Task and WMI Event Task

Filed under: Development — adallow @ 12:00 pm
Tags: ,

great blog post in this link, some really interesting stuff:


Quote from the Article:

Probably the most common data processing scenario in which WMI events could be helpful, involve launching a sequence of tasks activities as soon as data to be processed becomes available (e.g. by being copied to target computer). This can be accomplished by employing a SELECT query against __InstanceCreationEvent class in combination with another class, for which creation of a new instance is equivalent to creation of a new file on a managed computer. The best match in this case (from the performance point of view) is the CIM_DirectoryContainsFile class (this class forms an association between CIM_Directory and CIM_File classes, which are referenced as its GroupComponent and PartComponent properties, respectively). In order to detect a new file appearing in a specific directory (in our example c:\Data), you would run the following query (note that the last entry contains extra backslashes as so-called escape characters, which ensure proper string parsing. Such characters need to be applied whenever you want the next character to be treated literally. For example, by placing it after "Win32_Directory.Name=\, you ensure that the following double quote does not indicate the end of this string, but rather the beginning of the path to target folder c:\Data. Similarly, we added it in front of each backslash appearing in the folder path):

SELECT * FROM __InstanceCreationEvent WITHIN 10
 WHERE TargetInstance ISA "CIM_DirectoryContainsFile"
 AND TargetInstance.GroupComponent = "Win32_Directory.Name=\"c:\\\\Data\""

Now it is time to look into incorporating this functionality into SSIS packages using the WMI Event Watcher Task. Start by creating a new project using SQL Server Business Intelligence Development Studio. Drag the WMI Event Watcher Task from the toolbox onto the Control Flow area of the package designer interface. Right-click on it and select Edit option from the context sensitive menu. In the resulting WMI Event Watcher Task Editor window, switch to the WMI Options entry.

SSIS Options for actions on file existance (like a File Watcher)

Filed under: Development — adallow @ 11:52 am

1) File.Exists(path) call Script Task

2) ForEach File Enumerator see: http://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx

3) File Watcher Task see: http://www.sqlis.com/post/File-Watcher-Task.aspx

SSIS: VSA requires DLLs to be in the Microsoft.Net folder (but not all the time)

Filed under: Development — adallow @ 11:43 am

from: http://blogs.conchango.com/jamiethomson/archive/2005/11/02/2341.aspx

Very interesting post, quoted below, gets around some deployment issues:

Recently I have been using the SSIS Script Task and Script Component quite heavily. For those that don’t know, these items use Visual Studio for Applications (VSA) under the covers.

There is a peculiar limitation of VSA that requires you to place any DLLs that you want to reference into the Microsoft.Net\Framework folder of your machine – it isn’t enough to GAC it.

Happily this only needs to be done on development machines because this is a design-time requirement. When the VSA apps run they use DLLs in the GAC – they don’t need to be in the Microsoft.Net\Framework folder. Or so it seems to me anyway. To prove this I changed the name of my DLL in the Microsoft.Net\Framework folder and sure enough I got design-time errors but my packages containing script tasks/components that referenced that DLL still ran successfully. One caveat – this will only work if the script is pre-compiled – so make sure the PreCompile setting on your script task/component is set to TRUE.

Calling C# Assembly from SSIS Script Task

Filed under: Development — adallow @ 11:40 am

To call a C# assembly from an SSIS Task you need to do the following:

1- Build the C# with strong naming ( SDK Command :>sn /K c:\key.snk, add the Key.snk to the project and use it to sign it)

2- Add the Assembly to the CAG (VS Command:>gacutil /i AssemblyName.dll)

3- Copy the assembly to the “C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727″ folder for the Develpment or Production server

4- Form the SSIS Script designer, add the reference as it should appear in the list.

5- Import the library and instentiate an object to be used for the task

from: http://oassaf.wordpress.com/2007/05/24/calling-c-assembly-from-ssis-script-task/

October 30, 2008

TFS Work Item Bulk Editing

Filed under: Development — adallow @ 4:15 am

Using the TFS power toys, and ‘Work Item Templates’ you can do bulk updates of work items in TFS.

see: http://blogs.msdn.com/teams_wit_tools/archive/2007/10/05/tfs-power-tools-release-work-item-templates-bulk-edit.aspx

TFS Rosario: Hierarchical Work Items

Filed under: Development — adallow @ 2:52 am
Tags: ,

Some interesting info on the next version of TFS, which will make hierarachical work item management easier:

TFS Hierarchical Work Items

TFS Hierarchical Work Items

see: http://www.holliday.com.au/resource/WindowsLiveWriter/TFSRosarioFeedbackHierarchicalWorkItems_10690/rosario_wbs.jpg?fileId=954920

Ext JS: cross-browser JS library for building rich web apps

Filed under: Development — adallow @ 2:48 am
Tags: ,

A Senior PM from work put me onto ExtJS which is a useful looking active style js ajax library.

It includes:

  • High performance, customizable UI widgets
  • Well designed and extensible Component model
  • An intuitive, easy to use API
  • Commercial and Open Source licenses available


October 29, 2008

Deleting multiple TFS workitems at once

Filed under: Development — adallow @ 11:40 pm

In TFS 2008, there’s a capability to delete unused work item via a command line tool (TFPT.EXE) provided by the TFS 2008 Power Tools.

See following: http://www.bappedyanto.com/post/Delete-Work-Item-in-TFS.aspx

October 19, 2008

JQuery and alternating table row colors

Filed under: Development — adallow @ 6:45 am

From http://www.packtpub.com/article/jquery-table-manipulation-part2

Check out the link for more details and more complex examples.

Can be as simple as two lines of code to alternate the background color:

$(document).ready(function() {

$(‘table.sortable tbody tr:odd’).addClass(‘odd’);

$(‘table.sortable tbody tr:even’).addClass(‘even’);


If we declare background colors for the odd and even classes as follows, we can see the rows in alternating shades of gray:

tr.even {

background-color: #eee;


tr.odd {

background-color: #ddd;


October 17, 2008

Trouble Installing .Net 3.5 in some cases

Filed under: Development — adallow @ 5:54 am
Tags: ,

We were upgrading some old servers which had previously had .Net 1.1 and 2.0 to .net 3.5 and ran into some troubles.

The following blog post had some helpful info:


October 16, 2008

FileSystemWatcher Tips

Filed under: Development — adallow @ 4:14 am

from http://weblogs.asp.net/ashben/archive/2003/10/14/31773.aspx

“The .NET FileSystemWatcher class makes it possible to quickly and easily launch business processes when certain files or directories are created, modified, or deleted. The FileSystemWatcher class, for example, can be quite useful in application integration, by way of monitoring incoming data files and processing it once an event is raised. It listens to the file system change notifications and raises events when a directory, or file(s) in a directory, changes. The component can watch files on a local computer, a network drive, or a remote computer.

I’ve come to realize that it does need some understanding of this class to make it work efficiently. For example, a denial-of-service attack is possible if a malicious program gains access to a directory the FileSystemWatcher component is monitoring, and which thereby generates so many changes that the component cannot manage them and can cause a buffer overflow or other drastic effects. Following are some tips and notes on how to use the FileSystemWatcher class to build a more robust solution:

1. Events being raised twice – An event will be raised twice if an event handler (AddHander FSW.Created, AddressOf FSW_Created) is explicitly specified. This is because, by default, the public events automatically call the respective protected methods (OnChanged, OnCreated, OnDeleted, OnRenamed). To correct this problem, simply remove the explicit event handler (AddHandler …).

2. Events being raised multiple times – In some cases a single event can generate multiple events that are handled by the component. Because FileSystemWatcher monitors the operating system activities, all events that applications fire will be picked up. For example, when a file is moved from one directory to another, several OnChanged and some OnCreated and OnDeleted events might be raised. Moving a file is a complex operation that consists of multiple simple operations, therefore raising multiple events. Such multiple events can be correctly handled and processed by using a simple boolean flag check (for a first-come-first-serve approach) or by setting the FileSystemWatcher.NotifyFilter property to one of the NotifyFilters values.

3. Thread Safety – Any public static (Shared in VB) members of this class type are thread safe. Any instance members are not guaranteed to be thread safe.

4. File System Type – The FileSystemWatcher does not raise events for CDs and DVDs, because time stamps and properties cannot change for such media types.

5. Filter – The Filter property can be used to watch for changes in a certain type(s) of file(s) (eg: “*.txt”). To watch for changes in all files, set the Filter property to an empty string (“”). Hidden files are also monitored by the FileSystemWatcher.

6. Internal Buffer – The FileSytemWatcher component uses an internal buffer to keep track of file system actions. You should set the buffer to an appropriate size for the approximate number of events you expect to receive. By default, the buffer is set to a size of 4 KB. A 4 KB buffer can track changes on approximately 80 files in a directory. Each event takes up 16 bytes in the buffer, plus enough bytes to store the name of the file, in Unicode (2 bytes per character), that the event occurred on. You can use this information to approximate the buffer size you will need. You (re)set the buffer size by setting the InternalBufferSize property. If there are many changes in a short time, the buffer can overflow. This causes the component to lose track of changes in the directory, and it will only provide blanket notification. Increasing the size of the buffer is expensive, as it comes from non-paged memory that cannot be swapped out to disk, so keep the buffer as small as possible. Setting the Filter does not decrease what goes into the buffer. If you are using Microsoft Windows 2000, you should increase the buffer size in increments of 4 KB, because this corresponds to the operating system’s default page size. With any other operating system, you should increase the buffer size in increments that correspond to the operating system’s default page size. If you are unsure of the default page size for the operating system you are using, the safest way to proceed is to just double the original size of the buffer. This will maintain the original interval needed for your operating system.

7. Directories – Changing a file within a directory you are monitoring with a FileSystemWatcher component generates not only a Changed event on the file but also a similar event for the directory itself. This is because the directory maintains several types of information for each file it contains – the names and sizes of files, their modification dates, attributes, and so on. Use the IncludeSubdirectories property to indicate whether or not you want to include the subdirectories of the directory you are watching. If you turn this off when you do not need it, you will receive fewer events than when it is turned on.

8. Stop Watching – When file system monitoring is not needed anymore, you should set the EnableRaisingEvents property to False to disable the component, otherwise the component will continue listening.

The FileSystemWatcher class provides a useful feature but it should be implemented along with a thorough examination.”

FileSystemWatcher – Why Does It Stop Working

Filed under: Development — adallow @ 4:12 am

Interesting post at (all content bleow taken from this link):

Taken from: http://www.codeguru.com/csharp/.net/net_general/tipstricks/article.php/c9113/

“An application I was working on that used the FileSystemWatcher class and was intended to run 24/7 would periodically stop working. After a little searching, I managed to narrow it down to network outages. You see, the watcher was looking at a network drive, and intermittently (as networks will) it was dropping out and then coming back again. I soon learnt that, when this happens, the FileSystemWatcher loses track of what it was supposed to do.

Easy to fix? Well, it’s not too hard. Check out the example below. You can even test this on your local machine by simply removing the directory that is being searched:”

using System;
using System.IO;

namespace ConsoleApplication1
class Class1
private static FileSystemWatcher watcher =
new FileSystemWatcher();

static void Main(string[] args)

// set up the FileSystemWatcher object
private static void WatchFile()
// ***** Change this as required
watcher.Path = @”\\myServer\c$\test\”;

// For this example, I only care about when new files are
// created
watcher.NotifyFilter = NotifyFilters.LastWrite;
watcher.Filter = “*.txt”;

// Add event handlers: 1 for the event raised when a file
// is created, and 1 for when it detects an error.
watcher.Changed += new FileSystemEventHandler(NewFile);
watcher.Error += new ErrorEventHandler(WatcherError);

// Begin watching.
watcher.EnableRaisingEvents = true;

// Define the found event handler.
private static void NewFile(object source, FileSystemEventArgs e)
Console.WriteLine(“A file has been found!”);

// The error event handler
private static void WatcherError(object source, ErrorEventArgs e)
Exception watchException = e.GetException();
MessageBox.Show(“A FileSystemWatcher error has occurred: ”
+ watchException.Message);
// We need to create new version of the object because the
// old one is now corrupted
watcher = new FileSystemWatcher();
while (!watcher.EnableRaisingEvents)
// This will throw an error at the
// watcher.NotifyFilter line if it can’t get the path.
Console.WriteLine(“I’m Back!!”);
// Sleep for a bit; otherwise, it takes a bit of
// processor time

App & Source Code to Update your TFS Warehouse

Filed under: Development — adallow @ 4:04 am

Eric Lee has an intersting post where he provides teh source code to an app that you can use to update your TFS Warehouse. Its at:


TFS: Empty reports if you delete and recreate a project with the same name

Filed under: Development — adallow @ 3:47 am

I am using TFS 2008 and if I delete a project using TFSDeleteProject.exe and recreate another with exactly the same name then all the TFS reports are blank. The solution is to not recreate the project with the same name (I tried rebuilding the warehosue but that did not seem to help in my case):

“The warehouse is a historical repository, and it will retain information about projects even after they are deleted from the operational stores.”


Deleteing a TFS Project

Filed under: Development — adallow @ 3:42 am

To delete a TFS project, you can use teh command line tool TfsDeleteproject.exe which is normally found in ‘C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE’ directory.

Open a command promt, CD to that directory and then issue teh following command:

tfsdeleteproject /server:http://MyServer:8080 MyProjectName

Obviously change teh MyServer to be the name of your server and the MyProjectName to be the name of your project.

But if you do delete a project don’t recreate another project afterwards with the same name, I’ll cover why in another post.

October 13, 2008

Avoid search spidering via a robots.txt file

Filed under: Development — adallow @ 10:27 am

From google:

To prevent robots from crawling your site, place the following robots.txt file in your server root:

User-agent: *
Disallow: /

To remove your site from Google only and prevent just Googlebot from crawling your site in the future, place the following robots.txt file in your server root:

User-agent: Googlebot
Disallow: /

Each port must have its own robots.txt file. In particular, if you serve content via both http and https, you’ll need a separate robots.txt file for each of these protocols. For example, to allow Googlebot to index all http pages but no https pages, you’d use the robots.txt files below.

For your http protocol (http://yourserver.com/robots.txt):

User-agent: *
Allow: /

For the https protocol (https://yourserver.com/robots.txt):

User-agent: *
Disallow: /

NB: if a robot discovers your site by other means –
for example, by following a link to your URL from another site – your
content may still appear in our index and our search results. To
entirely prevent a page from being added to the Google index even if
other sites link to it, use a noindex meta tag.

Viewing application/json mime type docs in your browser

Filed under: Development — adallow @ 10:22 am
Tags: ,

Normally firefox will pop up and ask you to view application/json as a file (like a file download). This can get annoying.

To view this in Firefox 3 Directly you can use ‘Open in Browser’ add in:


or the JSONovich is a Firefox extension that pretty-prints and colorizes JSON content.


To associate it with an external application directly you can use Firefox ‘MIME Edit’.  It word with Firefox 2. You can get it from: https://addons.mozilla.org/en-US/firefox/addon/4498

You can do the same in IE without needing a tool by updating the Windows Registry as follows:

[HKEY_CLASSES_ROOT\MIME\Database\Content Type\application/json]

Further info at: http://msdn.microsoft.com/en-us/library/ms775148.aspx

Build a Queued (MSMQ) WCF Response Service

Filed under: Development — adallow @ 9:28 am
Tags: ,

Juval Lowy has an interesting article over on MSDN about building a queued WCF response.


“Windows Communication Foundation (WCF) enables disconnected work between clients and services. The client posts messages to a queue and the service processes them later. Such interaction permits a different programming model from the default request/response pattern, enabling possibilities such as load leveling, improved availability, and compensating work, to name just a few. This column starts with a brief introduction to Windows® Communication Foundation queued calls and then presents an interesting problem-how to get results out of a queued call-and the solution via some cool Windows Communication Foundation programming techniques and a few helper classes I wrote for this purpose.”

Returning a HTTP Respose Code from WCF Rest

Filed under: Development — adallow @ 9:26 am
Tags: ,

The WebOperationContext has a property called OutgoingResponse (which is of type OutgoingWebResponseContext) which in turn has a StatusCode property that you can set. WebOperationContext.Current is available for REST based WCF services in much the same way as HttpContext is available for ASMX/ASPX and ServiceContext is available for normal (non rest) WCF Services

     = System.Net.HttpStatusCode.OK;

October 8, 2008

Detecting IE Mobile

Filed under: Development — adallow @ 1:34 am

From the IE Mobile Team Weblog at:


“For Windows Mobile 5.0, the “current” release, the User-Agent header that the browser sends across is one of the following two strings:

  • Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240×320)
  • Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 176×220)

Moving forward, here’s the new IE Mobile User-Agent string:

  • Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; IEMobile m.n)

If you want to detect the current/older IE Mobile browsers, the way to do it is to look for “PPC” or “Smartphone“, as well as “Windows CE” in that string.  That’s the only sure-fire way to be certain of what you’re getting.

If you want to detect the new browsers coming out, just look for the string “IEMobile” as part of the User-Agent header.  Since the capabilities of the Pocket PC and Smartphone versions of the browser are identical, and they’re built from the identical code base, there’s no reason to differentiate them any more. “

Ajax on Windows Mobile

Filed under: Development — adallow @ 1:27 am

Interesting article: http://channel9.msdn.com/wiki/mobiledeveloper/programmingwithinternetexplorermobileandajax/

“Ajax is a design model that has the aim of making web sites that are close to applications in terms of responsiveness and usability. Ajax applications are very suited to mobile devices, as they are lightweight, do not require any code to be installed on the device itself, and can be accessed remotely using the built-in (Internet Explorer Mobile) client that’s present on every device.”

October 6, 2008

Mono and Tibco RV

Filed under: Development — adallow @ 11:46 am

The below is taken from: http://weblogs.asp.net/mdavey/pages/79456.aspx I came across it a few years ago and found it useful based on what i was doing at the time, I just found it again in my browser favourites so thought i would post it for the sake of completeness….

Tibco RV is often used in investment banks to send market data. Its therefore going to be a requirement for any front-office trading application running on Linux and Mono to subscribe to Tibco RV subjects. What follows is a simple example of the code required to do this – effectively a Mono language binding for Tibco RV. This code was written on RedHat 9.0, with Mono 0.30, and Tibco 7.2.

First we need a C++ library (.so) which uses the Tibco RV C++ API to setup a simple subscription. Callback’s from C++ to C# (unmanaged to managed) are handled by C++ function pointers and normal C# delegates. The C++ “Start” function below will be called by C#, passing a C# delegate, which the C++ will callback on when a message is received on the Tibco RV subject.


#include “tibrv/tibrvcpp.h”

/* Transport parameters */

char* serviceStr = NULL;
char* networkStr = NULL;
char* daemonStr = “tcp::7500”;

typedef void (*stringFunction)(char*);

stringFunction stringFunctionPtr;
/* Message callback class */
class MsgCallback : public TibrvMsgCallback

void onMsg(TibrvListener* listener, TibrvMsg& msg)
const char* sendSubject = NULL;
const char* replySubject = NULL;
const char* msgString = NULL;

// Get the subject name to which this message was sent

// If there was a reply subject, get it

// Convert the incoming message to a string

if (replySubject != NULL)
printf(“subject=%s, reply=%s, message=%s\n”, sendSubject, replySubject, msgString);
printf(“subject=%s, message=%s\n”, sendSubject, msgString);

printf(“About to do callback to C#\n”);

extern “C” void Start(stringFunction f)
stringFunctionPtr = f;
TibrvStatus status;

// open Tibrv
status = Tibrv::open();
if (status != TIBRV_OK)
fprintf(stderr,”Error: could not open TIB/RV, status=%d, text=%s\n”, (int)status,status.getText());

// Create network transport
TibrvNetTransport transport;
status = transport.create(serviceStr,networkStr,daemonStr);
if (status != TIBRV_OK)
fprintf(stderr,”Error: could not create transport, status=%d, text=%s\n”, (int)status,status.getText());

TibrvListener* listener = new TibrvListener();
status=listener->create(Tibrv::defaultQueue(),new MsgCallback(),&transport,”SomeSubject”);
if (status != TIBRV_OK)
fprintf(stderr,”Error: could not create listener on %s, status=%d, text=%s\n”, “SomeSubject”,(int)status,status.getText());
printf(“Listening on: %s\n”,”SomeSubject”);

// dispatch Tibrv events
while((status=Tibrv::defaultQueue()->dispatch()) == TIBRV_OK);

// if everything is Ok we’ll never get here
fprintf(stderr,”Error: dispatch failed, status=%d, text=%s\n”, (int)status,status.getText());

We use the DllImport .NET attribute to tell C# where the C++ “Start” method should be located. The TibCallback delegate must match the C++ function pointer stringFunction from an argument perspective.

using System;
using System.Threading;
using System.Runtime.InteropServices;

namespace Test
public delegate void TibCallback(string s);

public class Class1
[DllImport(“”, CharSet=CharSet.Ansi)]
public static extern void Start(Delegate d);

private Thread tibThread;

static void Main(string[] args)
new Class1().Run();

public void Run()
tibThread = new Thread(new ThreadStart(StartTib));
tibThread.IsBackground = true;
tibThread.Name = “TibThread”;

private void StartTib()
Start(new TibCallback(this.TibMsg));

public void TibMsg(string s) {
Console.WriteLine(“TibMsg called”);

Processing: a language for data visualisation

Filed under: Development — adallow @ 11:40 am

I have been taking a look at, and and keeping an eye on, processing for the last few years. It has been awesome for doing data visualisation stuff. So far I have really enjoyed it. Its based on top of java (which means you need a JVM in your browser), I wonder if anyone will make a Silverlight based version?

From the website: Processing is an open source programming language and environment for people who want to program images, animation, and interactions. It is used by students, artists, designers, researchers, and hobbyists for learning, prototyping, and production. It is created to teach fundamentals of computer programming within a visual context and to serve as a software sketchbook and professional production tool. Processing is an alternative to proprietary software tools in the same domain.


Daniel Shiffman has a good related blog. Really interested stuff, he takes it to next level as a platform for installation art. He is an Assistant Arts Professor at the Interactive Telecommunications Program at NYU’s Tisch School of the Arts his blog can be found at: http://www.shiffman.net/

.Net moving average calculator

Filed under: Development — adallow @ 11:34 am

I found this in my web travels, It was useful in a simple trading app demo I was working on. Pretty easy stuff, but useful anyway….

// create a new calculator with a window size of 5
MovingAverageCalculator calculator = new MovingAverageCalculator(5);
// loop through the values 1 to 10
for (int i=1; i<=10; i++)
// write out the average

This sample code outputs values:

Source Code:
    /// <summary>
    /// Calculates a moving average value over a specified window.  The window size must be specified
    /// upon creation of this object.
    /// </summary>
    /// <remarks>Authored by Drew Noakes, February 2005.  Use freely, though keep this message intact and
    /// report any bugs to me.  I also appreciate seeing extensions, or simply hearing that you're using
    /// these classes.  You may not copyright this work, though may use it in commercial/copyrighted works.
    /// Happy coding.
    /// Updated 29 March 2007.  Added a Reset() method.</remarks>
    public sealed class MovingAverageCalculator
        private readonly int _windowSize;
        private readonly float[] _values;
        private int _nextValueIndex;
        private float _sum;
        private int _valuesIn;

        /// <summary>
        /// Create a new moving average calculator.
        /// </summary>
        /// <param name="windowSize">The maximum number of values to be considered
        /// by this moving average calculation.</param>
        /// <exception cref="ArgumentOutOfRangeException">If windowSize less than one.</exception>
        public MovingAverageCalculator(int windowSize)
            if (windowSize < 1)
                throw new ArgumentOutOfRangeException("windowSize", windowSize, "Window size must be greater than zero.");

            _windowSize = windowSize;
            _values = new float[_windowSize];


        /// <summary>
        /// Updates the moving average with its next value, and returns the updated average value.
        /// When IsMature is true and NextValue is called, a previous value will 'fall out' of the
        /// moving average.
        /// </summary>
        /// <param name="nextValue">The next value to be considered within the moving average.</param>
        /// <returns>The updated moving average value.</returns>
        /// <exception cref="ArgumentOutOfRangeException">If nextValue is equal to float.NaN.</exception>
        public float NextValue(float nextValue)
            if (float.IsNaN(nextValue))
                throw new ArgumentOutOfRangeException("nextValue", "NaN may not be provided as the next value.  It would corrupt the state of the calculation.");

            // add new value to the sum
            _sum += nextValue;

            if (_valuesIn < _windowSize)
                // we haven't yet filled our window
                // remove oldest value from sum
                _sum -= _values[_nextValueIndex];

            // store the value
            _values[_nextValueIndex] = nextValue;

            // progress the next value index pointer
            if (_nextValueIndex==_windowSize)
                _nextValueIndex = 0;

            return _sum / _valuesIn;

        /// <summary>
        /// Gets a value indicating whether enough values have been provided to fill the
        /// speicified window size.  Values returned from NextValue may still be used prior
        /// to IsMature returning true, however such values are not subject to the intended
        /// smoothing effect of the moving average's window size.
        /// </summary>
        public bool IsMature
            get { return _valuesIn == _windowSize; }

        /// <summary>
        /// Clears any accumulated state and resets the calculator to its initial configuration.
        /// Calling this method is the equivalent of creating a new instance.
        /// </summary>
        public void Reset()
            _nextValueIndex = 0;
            _sum = 0;
            _valuesIn = 0;

Sorting System.Collections.Generic.List

Filed under: Development — adallow @ 11:27 am

To get the correct sorting on the .Sort method of the the Generic List, then objects that have been added to the list (e.g. of type <T>) should have implemented the IComparable interface and shold have implemented the CompareTo Method, such as:

class Person:IComparable { private string _FirstName; private int _Age; public Person(string _FirstName, int _Age) { this._FirstName = _FirstName; this._Age = _Age; } public string FirstName { get { return _FirstName; } set { _FirstName = value; } } public int Age { get { return _Age; } set { _Age = value; } } // sorting in ascending order public int CompareTo(object obj) { Person person = (Person) obj; return this.FirstName.CompareTo(person); } } However you can skip the need to implement the interface and CompareTo if you use a delegate on the call to the .Sort method as follows:
List<Person> persons = new List<Person>(); persons.Add( new Person("Tom",30) ); persons.Add(new Person("Harry", 55)); // sort in ascending order persons.Sort( delegate(Person person0, Person person1) { return person0.FirstName.CompareTo(person1.FirstName); } ); // sort in descending order persons.Sort( delegate(Person person0, Person person1) { return person1.FirstName.CompareTo(person0.FirstName); } ); From: http://devintelligence.com/blogs/netadventures/archive/2007/01/16/sorting-system-collections-generic-list-t.aspx

Improving .NET Application Performance and Scalability

Filed under: Development,Enterprise & Application Architecture — adallow @ 6:00 am
Tags: ,

from JD Meir, check out the following link for some really useful tips: http://msdn.microsoft.com/en-us/library/ms998530.aspx

Summary from the link: This guide provides end-to-end guidance for managing performance and scalability throughout your application life cycle to reduce risk and lower total cost of ownership. It provides a framework that organizes performance into a handful of prioritized categories where your choices heavily impact performance and scalability success. The logical units of the framework help integrate performance throughout your application life cycle. Information is segmented by roles, including architects, developers, testers, and administrators, to make it more relevant and actionable. This guide provides processes and actionable steps for modeling performance, measuring, testing, and tuning your applications. Expert guidance is also provided for improving the performance of managed code, ASP.NET, Enterprise Services, Web services, remoting, ADO.NET, XML, and SQL Server.

reCAPTCHA: a freely available CAPTCHA implementation.

Filed under: Development — adallow @ 5:54 am

From the website: http://recaptcha.net/

A CAPTCHA is a program that can tell whether its user is a human or a computer. You’ve probably seen them — colorful images with distorted text at the bottom of Web registration forms. CAPTCHAs are used by many websites to prevent abuse from “bots,” or automated programs usually written to generate spam. No computer program can read distorted text as well as humans can, so bots cannot navigate sites protected by CAPTCHAs.

  • A registration page for a forum or wiki.
  • A comment form.
  • Hiding information that could be useful to spammers (we recommend the reCAPTCHA Mailhide API for this).

IIS URL Rewrite Module – Go Live Release

Filed under: Development — adallow @ 5:50 am
Tags: ,

From: http://blogs.iis.net/ruslany/archive/2008/09/11/url-rewrite-module-go-live-release.aspx

“The IIS team has made the Go Live release of URL Rewrite Module for IIS 7.0 available for download. This release contains significant functionality and performance improvements and it is believed to have a quality level suitable for production deployments.

Here are the features that are new since CTP release (for a complete list of features and changes since CTP release, refer to this article):

  • Support for IIS kernel mode and user mode output caching. IIS 7.0 output caching provides significant performance improvements for web applications. URL rewrite module is fully compatible with both types of output caching. This means that now it is possible to safely cache responses for rewritten URL’s and thus boost the performance of web applications that rely on URL rewriting.
  • Lower case conversion. A lower case conversion function called “ToLower” can be used within rewrite rule to convert any rule input string or substitution URL to lower case.
  • Rule templates. Rule template is an extension for URL rewrite module user interface, that simplifies creation of rewrite rules for a particular task. The Go Live release of the module includes 3 built-in rule templates, plus it allows plugging in any number of custom templates.”

October 1, 2008

XSLT to Convert XML Elements to Attributes

Filed under: Development — adallow @ 4:01 am

David Carlisle has a good script:

If you want to convert the following from this:

<atom  phase="gas">
   <boiling_point units="Kelvin">20.28</boiling_point>

To this:
<atom phase="gas" name="Hydrogen" symbol="H">
    <boiling_point units="Kelvin">20.28</boiling_point>

Then the following XSLT can help:

<?xml version=’1.0′ encoding=’utf-8′?>
<xsl:stylesheet version=’1.0′ xmlns:xsl=’http://www.w3.org/1999/XSL/Transform&#8217; xmlns:msxsl=’urn:schemas-microsoft-com:xslt’ exclude-result-prefixes=’msxsl’>
<xsl:template match=’*’>
<xsl:for-each select=’@*|*[not(* or @*)]’>
<xsl:attribute name='{name(.)}’><xsl:value-of select=’.’/>
<xsl:apply-templates select=’*[* or @*]|text()’/>

September 30, 2008

Moving to Hyper V

Filed under: Development — adallow @ 1:23 pm

Hyper V with Windows 2008 seems to be great. Recently I helped move some of our old MS Virtual Machines from Virtual Server 2005 to Hyper V, and so far I am very happy with Hyper V.

To migrate a Windows 2003 Server there seemed to be several basic steps:

1) Remove the existing Virtual Machine Integration Services (i.e. the ones for Virtual Server 2005 or VPC 2007). you must do this BEFORE moving the VM across.

2) Make sure that the VM has Windows 2003 SP2 installed before moving across. Note just having 2003 R2 is not enough, you need SP2 as well.

3) Copy the virtual hard drive (VHD) to the new Hyper V server, and create a new virtual machine that uses that VHD.

4) Load the VM and install the Hyper V Integration Services (from the Hyper V VM manager you can do this from the menu). Note that your mouse will probably not work until you have done this, so you may have to brush up on your windows shortcut key skills 😉

5) That should be it. Try to avoid using the legacy network drivers etc; use the native Hyper V ones as the performance is much better.

You can read more about Hyper V at:


Linq to Sharepoint

Filed under: Development — adallow @ 12:12 pm
Tags: , ,

David Riddell McGhee, enterprise Account Technology Specialist for Microsoft Australia, has a really interesting blog, full of interesting things. Most recently i was reading about LinqToSharepoint.

This could be really useful for us as sharepoint is essentially our internal ECM system so integrating with it will become more common for us. From his blog:

Codeplex project:


Link I found this from:



How Do I: Use LINQ To SharePoint to Retrieve SharePoint Data?

Interesting Post on Cross Site Scripting (XSS)

Filed under: Development — adallow @ 12:05 pm
Tags: ,


Resize Microsoft Virtual Hard Disks (VHD’s)

Filed under: Development — adallow @ 12:04 pm

This could come in handy as many of our legacy virtual machines have small C drives, which over time can become an issue due to the size of modern software. Of course, take care and backup fully, as such a change may have issues. Done in two parts first use Gparted from http://gparted-livecd.tuxfamily.org/ to resize the VHD then use Gparted from http://gparted-livecd.tuxfamily.org/ to merge the old and new partions.

Check out the following link for details:


Create a free website or blog at WordPress.com.