Things hard and not so hard.... RSS 2.0

Folks - my blog has moved to

# Tuesday, 26 April 2011

Hi folks, I thought I’d share something that captivated me on this rainy Easter day and that was

Visual Studio Asynchronous Programming -
(you’ll need VS2010 + SP1 before you grab the CTP)
There’s a new improved compiler + an extended library for us.

Hands up who’s done async programming in either VB.NET or C#??? It’s a pain! Thread management, Main UI threads can only update certain objects, passing values between main + background threads, determining whether a thread has completed its tasks… and so on…

Basically all these ‘issues’ keep us from delving further into the world of asynchronous programming cause it very rapidly becomes complex just managing the two worlds – sync + async.

Today I was pleasantly surprised!!!

About a year ago I saw a great presentation on F# and I was amazed at how if they wanted to run a bit of code async it was simple an extra character as in:

set results = …..   <-sync

set results! = ….  <- run this async

(don’t quote me on the above, but it’s something like that – let’s call it pseudo code)

Why are we interested in this? – that’s always the first question to ask when investigating. Too many times we here ‘this is really cool’ and ‘check this cool software out’ etc… but the real reason of WHY do we want to go down this road is never answered.

On a ‘developers machine’ looking at 5 items, running a single test client – you’d have to say “works on my machine” and you’d have no need to async anything. True. Let’s move beyond our beloved developer box and think about UAT/PROD environments and what your code is doing.

What happens if 4 concurrent requests come along – how is your code going to perform? (As developers we’d be thinking …’it’s in the hands of IIS, not my issue’ :) )
(I recently was presented with a solution that ran across 20 odd servers, the answer to everything was get more hardware to make the app more performant, scalable etc – couldnt be the code.)

So as the requests start to build (don’t know an exact number but let’s say 100/sec), what is happening to your code? how often do we sit down with profiling tools on our code in this space? must be the disks..slow…and as always we have definitive proof works on my machine says the developer!

It’s not until we see our code running under load that we get an appreciation for where things could be improved and are causing grief for not only IIS but other systems as well.

Scalability, performance and scalability – single threaded app/service vs multi-threaded. Multi-threaded tend to win all the time.

Let me give you a couple of suggestions where this stuff is great:

  1. As part of a WF/WCF/Class where you want to ‘push’ some processing into the background – critical things can be done upfront, and you can push some of the ‘other stuff’ into the background.
  2. Take advantage of some of the great multi-core/multi-cpu Servers out there – single threaded tend to run on the same core on the same CPU (known as thread affinity)

Anyway enough jabbering from me and let’s see some of the hidden gems…

Async Programming Framework

Let me show you a couple of examples (from my set):

1. Fetching a webpage


Here I go off to twitter and search for all the BizTalk items.

Couple of things to notice
- …Async is added to the end of routines for convention, indicating that these are Async callable routines.
- not a single IAsyncResult to be seen, no StateObject and no Callback routines!
– line 104 the async keyword indicating that this routine itself can be called async if desired (more for the compiler)
- line 108 the await keyword is used in the Async framework to ‘wait for the async task to complete’  then move onto the next line.
- line 108 WebRequest.Create(…).GetResponseAsync – it’s the GetResponseAsync that is the async method, no …Begin or ..OnEnd calls! Just write it as you read it.
- line 109 We get a reference to the response stream (I should check for the existence of data etc – demo code, demo code :))
- line 112 …await stm.ReadAsync(…) – reads the response stream into a buffer on a background thread and we wait there until this completes (await keyword). By all means there’s many other ways to program this, as in we don’t need to wait, we could run this guy in the background quite happy and then check on him periodically.

That’s it! Not too tough at all, multi-threaded goodness right there. You can have blocking and non-blocking calls etc.

2. What about a Chunk of CPU based code

NO Async Example – as per normal, doing some cpu things.


Written in Async….


Points to notice:
- line 63 async Task<int[]> … to the Async framework the async methods are wrapped within a Task class. We must ‘wrap’ anything we return from our routines within a Task<..> – here I’m returning an int[]
-line 66 … = TaskEx.Run(…something to run in a background thread…). As we’re dealing with a block of code, there’s a Task Extension class that allows us to run that bit of code Async.
-line 79 await matrix – this line ensures that our async routine has indeed completed (or errored) before we move onto the next line.

Too easy if you’ve lived in the other world.

As always remember this is CTP so I wouldn’t go rolling out into Prod just yet. The perf numbers I get are pretty much identical to rolling all of this by hand with ThreadPool.QueueWorkItem(…) and IAsyncResult etc.

Well done MS!

Enjoy and here’s my VS.NET Sample Solutions – I had great fun! Oh – this is also applicable to Silverlight + WP7 apps :)

Tuesday, 26 April 2011 23:33:52 (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0] -
.NET Developer | Async | Silverlight | TechTalk | Tips
# Tuesday, 29 March 2011

Hi all, the BizTalk team has been busy and now the BizTalk 2010 exam has been officially released.

I’m going to sit it in the next few weeks and get a taste of it.

Good luck all and what a great day this is – well done Team!


Audience Profile

Candidates for this exam typically work as a BizTalk developer in an organization that has a need to integrate multiple disparate systems, applications, and data as well as the need to automate business processes by using BizTalk Server.


Candidates should have a solid understanding of fundamental BizTalk concepts around the core messaging engine and building business processes using orchestrations.


Candidates will have some exposure to larger-scale multi-server solutions and deployment/management familiarity. This core knowledge is required for BizTalk 2006 R2, 2009, and 2010. In addition, core knowledge of Windows Communication Foundation (WCF) and Electronic Data Interchange (EDI) is also required.

Candidates should also have at least two years’ experience developing, deploying, testing, troubleshooting, and debugging BizTalk Server 2006 and later solutions across multiple projects and have experience using the Microsoft .NET Framework, XML, Microsoft Visual Studio, Microsoft SQL Server, Web services, and WCF while developing BizTalk integration solutions


Credit Toward Certification

When you pass Exam 70-595: TS: Developing Business Process and Integration Solutions by Using Microsoft BizTalk Server 2010, you complete the requirements for the following certification(s):

Microsoft Certified Technology Specialist (MCTS): Microsoft BizTalk Server 2010

Note This preparation guide is subject to change at any time without prior notice and at the sole discretion of Microsoft. Microsoft exams might include adaptive testing technology and simulation items. Microsoft does not identify the format in which exams are presented. Please use this preparation guide to prepare for the exam, regardless of its format.

Tuesday, 29 March 2011 10:58:43 (AUS Eastern Standard Time, UTC+10:00)  #    Comments [0] -
BizTalk | 2010 | Insights
# Wednesday, 23 March 2011

The core client DLLs are now available as a separate download.

The strange thing is that when you install these on your machine it still puts them under the c:\program files\common files\….\Web Server Extensions… etc.

The main dlls are:

1: Microsoft.SharePoint.Client.dll

2: Microsoft.SharePoint.Client.Runtime.dll

& the Sliverlight client dlls.

Given the directory paths, it maybe worth just grabbing the dlls you need for you solution and deploy them as part of the package.

Wednesday, 23 March 2011 18:26:14 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
# Friday, 18 March 2011

April 4th folks…April 4th.

Quick background: The BizTalk team have been travelling the globe on a ‘Microsoft Integration Roadshow’ covering countless countries and cities.

On April 4th the bus stops in Sydney. Here’s the official blurb and I’ll be presenting – let me know if there’s anything you’d like covered in my demo and I’ll try and accommodate.









Monday, 4th April, 2011


The Menzies Sydney

14 Carrington Street,

Sydney NSW 2000















Sydney  |  Monday April 4th, 2011


Microsoft Integration Road Show

Worldwide events running Feb - Apr 2011


Enterprises today typically work in a fairly heterogeneous environment with disparate systems. Connecting the systems and applications sitting across the diverse platforms and tying them to the business processes has become one of the top priorities for most organisations. As they continue to evolve towards a cloud strategy - to take advantage of the economic and scale benefits - the need to have a robust Integration Platform escalates. Microsoft offers a tremendous opportunity for customers to make a paradigm shift in the way they do business to maximize their benefits and profitability whilst maintaining an optimized cost structure.


Don’t miss this exciting opportunity to learn how we can help you beat the demands of today’s difficult economy, about our commitment to BizTalk Server and how we plan to continue to innovate in the integration space helping you begin your journey to the Cloud.


8:30am – 9:00am:  Light Breakfast and Registration

9:15am – 10:00am: Keynote

“Innovations in Integration – Begin your journey to the Cloud”

Speaker: Paul Larsen

Group Program Manager, Microsoft Corporation

10:00am – 11:00am:  Customer session

Caltex is Australia's leading oil refiner and supplies products via a network of pipelines, terminals, depots and the company-owned and contracted transport fleet. Caltex made the business decision to acquire many of their independent resellers – who were spread across every state of Australia.

In this session you’ll learn how Caltex COSMOS project integrated those different reseller businesses into a single operating entity now called Caltex Petroleum Services.

Robin Brown, IT Project Manager, Caltex Australia

11:00am – 11:30am:  Break

11:30am – 12:30pm:  Technical Drilldown

Mick Badran, CTO, Breeze

This session is for those that want to delve into the technology to see the latest integration best practices and products including BizTalk Server 2010, AppFabric and Azure.


The Menzies Sydney

14 Carrington Street,

Sydney NSW 2000

Target Audience
CIO/TDM/BDM, IT Directors/Managers, Architects, IT Pro & Developers

To Register
Click here to register. Space is limited so register today to ensure your attendance at this event.




Microsoft confidential information. © 2011 Microsoft Corporation. All right reserved.clip_image007








Friday, 18 March 2011 09:54:47 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
BizTalk | 2010 | Events | BizTalk2010
# Thursday, 17 March 2011

As you may/may not know native Restful support is a little lacking in BizTalk 2010.

A ‘little’ massaging is needed.

By plugging in a couple of classes into the WCF stack, BizTalk sits in the middle quite nicely.

Netin Mehrotra from MS has come to the rescue – he provides a great walk through article and sample code to boot.



Enjoy guys.

The alternative is to create your own WCF Service in Windows Server AppFabric hosted in IIS and then you’ve still got the problem of ‘how’ to talk to BizTalk.

Choices…choices… :)

Thursday, 17 March 2011 14:21:25 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
AppFabricServer | BizTalk | 2010
# Monday, 14 March 2011

“Good People talk plans….Great people talk logistics” :)

Thanks Rahul – had to write that one down.

Monday, 14 March 2011 15:30:21 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
# Wednesday, 09 March 2011

Firstly thanks for all that attended my 5pm - ‘fireside’ session.

I definitely was a first for me having a session so late in the day. I took my shoes off, wiggled my toes and got into it up on stage.

The session was pretty light and easy to follow along as to get bogged down into the deep technicalities of data storage within SharePoint was going to put all to sleep.

During the session I spoke about (& demo-ed) each approach from Site/Web Property bags, Custom Service Apps, Lists/External Lists Pros and Cons of each – all good.

Here’s my slide deck guys – Enjoy.



Wednesday, 09 March 2011 23:53:37 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [3] -
Events | SPC2011 | SharePoint | 2010
# Sunday, 27 February 2011

Hey folks, Alan Smith and myself (much more Alan this time :) have brought the series back for another version and another year!
Myself and many other Biztalk MVPs and some great BizTalk-ers with fantastic real world experience share their knowledge.

As always the webcast series is designed to be an easy watch, level 200 ish and I’ve even had some folks reporting they watched the needy webcast on the way to clients to talk about for e.g. an EDI solution.


BizTalk 2010 Light And Easy Series – here’s where you’ll find the series
(Alan is in the process of uploading them)

  integration with BizTalk 2010 using the BizTalk WSS Adapter.

I created a 2 part episode – the first one deals with explaining the SharePoint 2010 environment, and the 2nd one deals with integration from BizTalk.

Here’s my recordings, PPTs and sample files.

Title WebCast PPT Description
Integration to SharePoint Part 1  Part 1 (110MB)  (2MB)

You will be taken through how SharePoint works, what a user sees, lists and investigating the new APIs present with SharePoint 2010.

This webcast talks about different techniques and how to integrate with SharePoint 2010 efficiently.

Integration to SharePoint Part 2  Part 2 (60MB)  (2MB)

This webcast deals with the installation and setup of the OOTB WSS BizTalk Adapter; examining various Send and Receive configurations within BizTalk and finally you’ll be introduced to a Custom SharePoint 2010 Adapter that uses the SharePoint ClientOM to talk to SharePoint 2010.

Sample Code for Part I and II  




Sunday, 27 February 2011 00:27:37 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [4] -
BizTalk | 2010 | Light and Easy Webcasts
# Thursday, 24 February 2011

Over the past months I’ve been reviewing a new BizTalk 2010 book – BizTalk 2010: Integrating Line of Business Systems

There’s a high caliber line up of Author’s all busily sharing their knowledge.

Kent’s got all the details here -

Looking forward to when it hits the shelves.

Well done guys – looking great from what I’m reading :)


Thursday, 24 February 2011 21:54:17 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
BizTalk | 2010

Hi folks, as promised here’s my little slide deck for the presentation given last week. We had a great audience with some very interesting questions.

Thanks all that attended as part of the Microsoft Partner Readiness program. Hope you’re enjoying and feel free to give me feedback as to what you’d like to see more of and less of.

Have fun,



Slides in ZIP PPT Slide Deck

Thursday, 24 February 2011 14:41:45 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
Events | Recordings | Readiness | 2010 | Training
# Wednesday, 23 February 2011

Windows 7 SP1 was released yesterday and after a 1.9GB download I was ready to install.

Or so I thought...

Ran the Upgrade from within my version of Windows 7 x64 on my Fujitsu laptop

After the installation and upon rebooting several times....the upgrade process was at the step of 'starting windows for the first time....' (not quite as this was an upgrade, but if we were installing from scratch that would be it).

I was lovingly greeted by a BSOD STOP 0x0000007B!!!

Going no further - message.

So I downloaded and burnt 'Win7 with SP1' and tried the whole fresh install again - same again. STOP ERROR

Alas....I'm writing this message while I'm re-installing just Win7 x64 without a hitch

Mick is avoiding SP1 like the plague right now!

I'm sure its been tested on a machine with SATA drives :)
Wednesday, 23 February 2011 16:15:23 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
# Thursday, 27 January 2011


While looking into an authentication problem I discovered this ‘new’ header sent back from a SharePoint 2010 machine.

Health Score? hmmm… I thought, what’s the max and what’s the min values. Is this good/bad? or don’t care?

So SharePoint 2010 has several Throttling features it used such as Client Auto Back-off which predominately when triggered, prioritises HTTP requests – such as HTTP POSTS are non delayed or throttled, but HTTP GETs are and new HTTP connections are throttled.

Here is one MS page that barely describes the Header – could do with updating that one.

SharePoint 2010 determines the health of a server by initially looking at system counters.

Let’s dig further….

Upon Reflecting the classic Microsoft.SharePoint.dll, there’s a Microsoft.SharePoint.Diagnostics section which I thought would be a great place to start. I found a
SPWebFrontEndDiagnosticsPerformanceCounterProvider class (amongst others there’s a SPDatabaseServer class as well)


The line above collection[0] = …. refers to the following collection


So putting all this together, the performance counters are:

  • WebAppPool - “SharePoint Foundation”
    • Global Heap Size
    • Native Heap Count
    • Process ID
  • OWSTimer & W3WP
    • Private Bytes
  • Processor (_total)
    • Processor Time

It appears the main class behind all of this is
SPHttpThrottleSettings where it appears that the throttling setting is turned off in ‘Single-Server’ deployments.

Digging further I came across the big-daddy class of it all (I think) -

SPPerformanceInspector – notice the method IsInThrottling() and the other is 2 constants that describe the displayed Throttled messages.

I also noticed another method on this class SetupRegKeyHealthScore.
Where HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\ServerHealthScore is the actual value you want to assign.


A value of 0 is great, 10 is bad. Over 10 means the server will go into Throttling (letting your clients know as well).

There’s many other things here, but I’ve got to head swimming.

Hope we unraveled this mystery a little more.


Thursday, 27 January 2011 16:43:16 (AUS Eastern Daylight Time, UTC+11:00)  #    Comments [0] -
SharePoint | 2010 | Tips
<2011 April>
 AppFabric CAT
AppFabric Windows Server Customer Advisory Team - New Blog.
[Feed] BizTalk 2006 - Windows SharePoint Services adapter
BizTalk 2006 Sharepoint adapter!!
 Breeze SharePoint 2010 Bootcamp
Breeze SharePoint 2010 Bootcamp
[Feed] BTS 2006 R2/EDI
[Feed] Chris Vidotto (MS BTS Legend)
Needs no intro....
 Mark Daunt
About the author/Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2017
Sign In
Total Posts: 608
This Year: 0
This Month: 0
This Week: 0
Comments: 270
All Content © 2017, Breeze