BBC identifies a growing concern over inappropriate Internet content in 2013!

Just spotted this article in October 2013 saying that Google’s move to add parental controls to chrome “… comes after growing concerns over inappropriate content children can be exposed to online.”

I believe the concerns have been there for a number of years and that Google is actually very late in adding such controls that other browsers have had for a long time (e.g. Internet Explorer since at least 2007, long before the BBC appears to have had any concerns over Internet content).

The article implies Google are simply reacting to changing times rather than playing catch-up.

SAML vs OAuth

Excellent article by Zach Dennis on the differences between SAML and OAuth2.

In a nutshell:

  • SAML 2.0 older specification not good for mobile and non-web devices but more established
  • OAuth2 new kid on the block with similar flows written in the age of mobile devices and native clients but not so tightly specified leading to some incompatibilities

Must create DependencySource on same Thread as the DependencyObject.

Stumped me for a bit because I wasn’t expecting this as a result of the change I made. I was creating a colour in my ViewModel like this:

private readonly Brush[] colours = new[] { Brushes.Black, Brushes.DarkBlue };

But then wanted to use some more funky colours so changed it to:

private readonly Brush[] colours = new[] { new SolidColorBrush(Color.FromRgb(0x04, 0x81, 0x9E)), new SolidColorBrush(Color.FromRgb(0xEC, 0xFC, 0x00)) };

Because I was no longer referencing the static brushes and instead creating them when this class is instantiated (which happened to be on a non UI thread), this caused the above ArgumentException (which had a stack trace and values that really didn’t point to where the error actually occured).

Fixing it meant doing it properly 🙂 I created the brushes in my View and used Style triggers to choose the appropriate brush based on a value in my ViewModel.

“value does not fall within the expected range” XAML exception using DataTemplateSelector

For the record I made a stupid error in Xaml and got bashed with the usual unhelpful error message (no stack trace, no line numbers just the message you see above).

I’d created a custom DataTemplateSelector but rather than set the ItemTemplateSelector property on the GridView, I’d put it inside the . Nothing complained but the app threw a runtime exception as above.

Instead putting the DataTemplateSelector as a static resource and setting ItemTemplateSelector=”{StaticResource myTemplateSelector}” resolved the problem.

Socket not working after WP7 tombstone resume

I’ve written an app that needs to connect to a WiFi router and broadcasts UDP packets. I was finding that after a tombstone and resume, the packets were no longer seen on the network using Wireshark. No errors were returned, the app was getting Success for the send and connect but it clearly wasn’t working.

It turns out that when the app resumed and the socket was reconnected, instead of defaulting to Wifi, it defaulted to MobileBroadbandGsm so it was sending the packets successfully but on the wrong network interface.

The solution turned out to be calling:


Thanks to Pat Long for his assistance.