...and everything in between RSS 2.0
# Friday, September 09, 2011

A recent project of ours has made the news this week > Centrebet deploys app integration platform.

This was a great project to be involved in, consisting of a great mix of technology:

  • Microsoft BizTalk Server
  • Windows Server AppFabric
  • Windows Azure AppFabric Service Bus
  • Windows Azure Hosted Services
  • F# asynchronous programming


A real software engineering project that had to meet high throughput and low latency requirements, incorporate new technologies and come in on very (very) tight time frames. Credit to go out to the team at Breeze for getting this over the line.

Friday, September 09, 2011 8:59:08 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General | Breeze | Cloud Services | F# | WCF | Windows Azure | Windows Server AppFabric
# Friday, August 12, 2011

I’m loving getting my teeth into F# (once I got over the initial learning curve).
I did however come across this today:


To fix re-install the Visual Studio 2010 F# 2.0 Runtime SP1. All good once again.

Happy functional programming Winking smile

Friday, August 12, 2011 11:52:05 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
# Monday, July 04, 2011

Sydney | SharePoint 2010 Bootcamp


“The best course I have done in years!”

“A fantastic course. Mick really has depth of knowledge and is a very engaging trainer”


REGISTER TODAY - 4 seats left!

Special offer of 15% discount if book & pay before June 30th 2011.


This is a 5-day bootcamp designed for both IT Professionals and Developers packed with fun and technical training to explore the features of SharePoint 2010 ‘out of the box’.

At course completion students will be able to upgrade their SharePoint V3 sites/portals to SharePoint 2010, to implement and extend Microsoft Office client side solutions, and also implement custom workflows developed in Visual Studio.

They’ll be equipped to care for their SharePoint farm, back it up and restore it, and set up and configure SharePoint 2010 infrastructure. Architecting the portal and sub-sites layouts is streamlined using best strategies and known best practices within the SharePoint space.

Students will create custom WebParts and SharePoint customisations easily, as well as site wide features, event handlers and InfoPath Forms based solutions. They will also explore Excel Services and Business Intelligence Offerings.

Be ready to roll up your sleeves and start your adventure here!

Date:                     Monday 25 – Friday 29 July 2011

Instructor: Mick Badran - MVP

Location:             Breeze Office

Edgecliff Court, Suite 5a

2 New McLean Street

Edgecliff NSW 2027

Time:                    8.30am – 4.30pm

Duration:             5 Days

Course Price:     $3,450.00 + GST


Register NOW: Emmav@breeze.net

Monday, July 04, 2011 9:28:22 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
Breeze | SharePoint
# Thursday, April 07, 2011

Hit this little hurdle recently while creating WCF Data Service against Azure Table Storage. At the moment only a handful of operators are supported by the client library when using the Table Storage Service.

Supported Query Operators

LINQ operator

Table service support

Additional information


Supported as defined.



Supported as defined.



Supported, with some restrictions.

The value specified for the Take operator must be less than or equal to 1,000. If it is greater than 1,000, the service returns status code 400 (Bad Request).

If the Take operator is not specified, a maximum of 1,000 entries will be returned.

First, FirstOrDefault



What this means is that we can not perform LINQ queries that group, order by, distinct or even return single entity properties from the query (we must always return the entire entity). In most situations the solution is to construct our LINQ queries that first make use of the supported operators and then use AsEnumerable() followed by any operations that are not supported. This generates two parts to the LINQ query. The first part (everything before the AsEnumerable) gets sent to the backend (Azure Table Storage in this case) and the remaining parts execute locally against the results of the first (in-memory). This helps get over the road-block but as you can image you are bringing a greater chunk of data down to the client and continuing processing there.

Some examples:

Using Distinct()

var query = myTableServiceContext.MyEntity.Where(e => e.Category == someCatgeory).AsEnumerable().Select(c => c.Name).Distinct();
Select next 5 entities after a given date and time (using OrderBy together with Take)
var query = myTableServiceContext.MyEntity.Where(e => e.Category == someCatgeory & e.StartDate > DateTime.UtcNow).AsEnumerable().OrderBy(o => o.StartDate).Take(5);

For further details check out the online documentation.

Thursday, April 07, 2011 8:32:00 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
.NET Framework | WCF | Windows Azure
# Wednesday, April 06, 2011

Just thought I might share some useful dev tools I have either found or have had recommended to me.

The first is a must if you are doing any LINQ action in your code (…and most of us are in some degree these days).
Check out LINQPad. I am blown away how useful this tool has been. Think SQL Management Studio for LINQ!


Another great tool I have been using lately is Neudesic’s Azure Storage Explorer


Essential for generating and managing Azure table storage data during development.
Plays nicely with both developer storage and Azure storage accounts.

Wednesday, April 06, 2011 2:53:00 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
.NET Framework | Windows Azure
# Tuesday, April 05, 2011

Released just last week, this codeplex project aims to make developing WP7 apps that talk to cloud storage easier to develop. Having been down that path over the last few days I was keen to test it out.

We get some nice new project templates:


But most importantly we get

  • A “working” version of the OData client library (System.Data.Services.Client)
  • A Windows Phone 7 Azure StorageClient library (WindowsPhoneCloud.StorageClient)

Just in time Smile with tongue out

Tuesday, April 05, 2011 10:36:29 PM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
Windows Azure | Windows Phone 7
# Tuesday, January 25, 2011

I am finding that the development storage emulator has a few “undocumented features”. A few days ago, I was happily working through the Windows Azure Training Kit and things were going well. Today I was putting together a PoC using pieces learnt from the labs. I kept hitting a problem when trying to insert an entity into the newly created table storage (running on the local Storage Emulator). I was getting the generic error message when querying the collection:

“one of the request inputs is not valid”

var match = (from c in this.context.Clients
              where c.Name == name
              select c).FirstOrDefault();


Some things I tried that didn’t help:

  • Restarting the Storage Emulator a few times.
  • Restarting the machine (always worth a shot!)
  • Deleting the entries in the TableContainer and TableRow tables in the development storage DB.
  • Recreating the development storage DB using DSINIT /forceCreate.
  • Running around the office naked.

After hunting around for quite some time (including running the lab code again and getting them same result) I tracked it down to the table storage schema not being created after issuing


Note: This worked happily when I was working through the labs a few days ago. Neither my code nor the lab code was working now. Annoyed

Looking at the underlying DB (using SQLEXPRESS on my VM) I found no schema populated


After some frustrating searching, I came across this post that suggested an ugly work around > azure-table-storage-what-a-pain-in-the-ass. It suggests that on the local storage emulator you need to “convince” the table service provider that you know what you are doing by inserting some dummy entities. This only appears to be needed when you have no data in your tables. So I added the following code in my data source constructor so it gets called by my service before performing any CRUD operations. 

// [WORK AROUND] See http://deeperdesign.wordpress.com/2010/03/10/azure-table-storage-what-a-pain-in-the-ass/
//  Generate some inserts to populate empty table
var client = new Client("dummy", "dummy");
this.context.AddObject("Clients", client);
var post = new Post("dummy", "dummy");
this.context.AddObject("Posts", post);

Ugly but it jumps the hurdle and allows me to get back to building out the rest of the solution. Just remember to comment it back out after you verify the schema xml has been populated successfully and your CRUD operations are going through.

Tuesday, January 25, 2011 1:53:33 PM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
Windows Azure
# Tuesday, November 30, 2010
HTTP Error 401.1 - Unauthorized: Access is denied due to invalid credentials.

"If I had a dollar for every time I’ve seen this…”

And yet the solution appears to be different each time. Or at least to me when it comes to issues with integrated Windows Authentication and Kerberos. Today the solution lay in forcing IIS to use NTLM authentication as suggested by the following KB article


To work around this behaviour if you have multiple application pools that run under different domain user accounts, you must force IIS to use NTLM as your authentication mechanism if you want to use Integrated Windows authentication only. To do this, follow these steps on the server that is running IIS:

  1. Start a command prompt.
  2. Locate and then change to the directory that contains the Adsutil.vbs file. By default, this directory is C:\Inetpub\Adminscripts.
  3. Type the following command, and then press ENTER:

    cscript adsutil.vbs set w3svc/NTAuthenticationProviders "NTLM"

  4. To verify that the NtAuthenticationProviders metabase property is set to NTLM, type the following command, and then press ENTER:

    cscript adsutil.vbs get w3svc/NTAuthenticationProviders

    The following text should be returned:

    NTAuthenticationProviders       : (STRING) "NTLM"
Tuesday, November 30, 2010 8:49:29 PM (AUS Eastern Daylight Time, UTC+11:00)  #    - Trackback
BizTalk General
# Monday, October 18, 2010

On a recent project I needed to resolve the identity of clients calling an orchestration exposed as a WCF service. Clients would use a X.509 certificate to sign the message. Configuring the WCF service was easy enough but I was not getting the party resolution piece working correctly. The WCF adapter (I was using WCF-CustomIsolated) was not populating the context property (BTS.SignatureCertificate) that the party resolution component uses to lookup the party even though the client certificate was being validated. The WCF adapter was dumping the soap headers into the context. I was left either to parse the headers manually and find a way to grab details of the signing certificate or somehow get the WCF adapter to do this work for me (as it was already validating the client certificate and checking we had the corresponding public key in the certificate store). Fortunately, I found a way we can get the adapter to help out.

The solution was to create a WCF service behavior extension to intercept message processing by the adapter (note this takes place before the message is presented to the receive pipeline). The custom behavior looks for a client certificate and if found writes the thumbprint into a custom soap header. The WCF Adapter would then write my custom header into the message context and I could grab it in a custom pipeline component. I chose to write a component to execute before the OOTB party resolution component and populate the BTS.SignatureCertificate context property with the value of certificate thumbprint. I could of done this all in one component and performed custom party resolution but thought this might be a bit cleaner.

So looking at the WCF service behavior

   1:  using System;
   2:  using System.ServiceModel;
   3:  using System.ServiceModel.Dispatcher;
   4:  using System.ServiceModel.Channels;
   5:  using System.ServiceModel.Description;
   6:  using System.IdentityModel.Claims;
   7:  using System.ServiceModel.Configuration;
   9:  namespace Breeze.WCF.ClientCertificateContext
  10:  {
  11:      public class MessageInspector : IDispatchMessageInspector, IServiceBehavior
  12:      {
  13:          #region IDispatchMessageInspector Members
  15:          object IDispatchMessageInspector.AfterReceiveRequest(ref Message request, IClientChannel channel, InstanceContext instanceContext)
  16:          {
  17:              object correlationState = null;
  18:              string thumbprint = "";
  20:              try
  21:              {
  22:                  // Gather thumbprint of signing certificate used by the client
  23:                  foreach (ClaimSet set in request.Properties.Security.ServiceSecurityContext.AuthorizationContext.ClaimSets)
  24:                  {
  25:                      foreach (Claim claim in set.FindClaims(ClaimTypes.Thumbprint, Rights.Identity))
  26:                      {
  27:                          thumbprint = BitConverter.ToString((byte[])claim.Resource);
  28:                          thumbprint = thumbprint.Replace("-", "");
  29:                      }
  30:                  }
  32:                  // Write this away as a custom message header
  33:                  if (!String.IsNullOrEmpty(thumbprint))
  34:                  {
  35:                      MessageHeader header = MessageHeader.CreateHeader("ClientCertificate", "http://schemas.breeze.net/BizTalk/WCF-properties", thumbprint);
  36:                      request.Headers.Add(header);
  37:                  }
  39:              }
  40:              catch (Exception ex)
  41:              {
  42:                  System.Diagnostics.EventLog.WriteEntry("WCF MessageInspector", String.Format("Exception caught: {0}", ex.ToString()));
  43:              }
  45:              return correlationState;
  46:          }
  48:          void IDispatchMessageInspector.BeforeSendReply(ref Message reply, object correlationState)
  49:          {
  50:          }
  52:          #endregion
  54:          #region IServiceBehavior Members
  56:          public void AddBindingParameters(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase, 
                                                System.Collections.ObjectModel.Collection<ServiceEndpoint> endpoints, BindingParameterCollection bindingParameters)
  57:          {
  58:              return;
  59:          }
  61:          public void ApplyDispatchBehavior(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
  62:          {
  63:              foreach (ChannelDispatcher channelDispatcher in serviceHostBase.ChannelDispatchers)
  64:              {
  65:                  foreach (EndpointDispatcher endpointDispatcher in channelDispatcher.Endpoints)
  66:                  {
  67:                      endpointDispatcher.DispatchRuntime.MessageInspectors.Add(this);
  68:                  }
  69:              }
  70:          }
  72:          public void Validate(ServiceDescription serviceDescription, ServiceHostBase serviceHostBase)
  73:          {
  74:              return;
  75:          }
  77:          #endregion
  78:      }
  80:      public class MessageInspectorElement : BehaviorExtensionElement
  81:      {
  82:          public override Type BehaviorType
  83:          {
  84:              get { return typeof(MessageInspector); }
  85:          }
  87:          protected override object CreateBehavior()
  88:          {
  89:              return new MessageInspector();
  90:          }
  91:      }
  94:  }


Tip: Don't forget to implement the BehaviorExtensionElement. You’ll need this to apply the service behavior via configuration (in the receive location) rather then having to do it programmatically. You will also need to sign, GAC and register the service behavior extension element in the machine.config (or service’s web.config in IIS)

With the WCF service behavior bits done, we need to add it to our receive location:


If you were to test the solution now, you’ll get the thumbprint of the client certificate written to your custom context property (http://schemas.breeze.net/BizTalk/WCF-properties#ClientCertificate) and will look something like this:

   1:  <ClientCertificate xmlns="http://schemas.breeze.net/BizTalk/WCF-properties">11C3E164C41ADC8DBA0EA6558784B9FAE19E398D</ClientCertificate>


I had thought I might be able to get away with writing this directly into the BTS.SignatureCertificate context property but the format is clearly different. The BTS.SignatureCertificate property needs just the certificate thumbprint string and obviously we have the xml wrapper. So we must create a simple pipeline component to sit somewhere before the party resolution component to grab the certificate thumbprint out of our custom context property and write it into the context property the party resolver component is looking for.


After deploying and setting the receive pipeline to use the custom one above, I got party resolution working like a bought one with the BTS.SigningCertificate, BTS.SourcePartyID and MessageTracking.PartyName context properties populated.

I guess I was a little surprised that all this was needed. WCF does a great job of abstracting out all the transport and security bits and moving them to configuration time (no additional code in our service or client). In the HTTP and SOAP adapter days, the MIME/SMIME pipeline component was used to decrypt and validate the signing certificate as well as populating the required context properties. Why doesn’t the WCF Adapter perform this part in the same way? I mean, its doing the decoding, decrypting and certificate validation. So why not the populating of these context properties? Perhaps there is secret squirrel checkbox somewhere I missed. Love to hear comments if anyone has done this differently?

[Updated: 19-10-2010]

Thanks to Thiago (see comments section) we have been able to simplify this further. The WCF adapter provides some “special” namespaces that allow us to instruct the adapter to write context properties in a more controlled way. Specifically we can instruct the adapter to write directly into defined property schema elements (e.g. OOTB BizTalk property schemas or deployed custom property schemas). This allows us to write the certificate thumbprint directly into the BTS.SigningCertificate context property and avoid the need for the custom pipeline component to move the value from the custom header property into the BTS.SigningCertificate property as described above.

To do this we simply change the IDispatchMessageInspector.AfterReceiveRequest to make use of these special namespaces.

                // Write this away as a custom message header
                if (!String.IsNullOrEmpty(thumbprint))
                    // Write the thumbprint directly to the BTS.SigningCertificate context property
                    //  Thanks to Thiago http://connectedthoughts.wordpress.com
                    // Create a collection of context properties we want the adapter to write/promote for us                    
                    XmlQualifiedName clientCertificateProp = 
                        new XmlQualifiedName("SignatureCertificate", "http://schemas.microsoft.com/BizTalk/2003/system-properties"); //Maps to BTS.SignatureCertificate
                    List<KeyValuePair<XmlQualifiedName, object>> promoteProps = new List<KeyValuePair<XmlQualifiedName, object>>();
                    promoteProps.Add(new KeyValuePair<XmlQualifiedName, object>(clientCertificateProp, thumbprint));
                    // Add the property collection to the request
                    //  Use the http://..../Promote to have the adapter promote the context prop
                    //  or use  http:/...../WriteToContext to just have the property written but not promoted.
                    request.Properties.Add("http://schemas.microsoft.com/BizTalk/2006/01/Adapters/WCF-properties/Promote", promoteProps); 


Now we can do away with the custom pipeline component bits and use the OOTB XMLReceive pipeline (as it contains the party resolver component already). The certificate thumbprint will be written directly into the BTS.SigningCertificate context property (and promoted) ready for the party resolver component to use.

Nice work Thiago. thumbs_up

Monday, October 18, 2010 11:50:22 AM (AUS Eastern Standard Time, UTC+10:00)  #    - Trackback
BizTalk General | WCF
<September 2011>
About the author/Disclaimer

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

© Copyright 2014
Sign In
Total Posts: 64
This Year: 0
This Month: 0
This Week: 0
Comments: 182
Pick a theme:
All Content © 2014, Breeze
DasBlog theme 'Business' created by Christoph De Baene (delarou)