More About This Website

All information is provided "AS IS" with no warranties, and confers no rights


Heading to CES 2010 in Las Vegas – In-flight Thoughts

As I write this post I'm sitting on a plane heading to Las Vegas. This is my second year in a row going to CES after taking a break for a number of years. Last year the mood heading into CES was grim, and the bad news just kept coming in daily. Now a year later while we are not near a full recovery things are clearly picking up and optimism is much higher. It will be interesting to see what's in store - there's already been a lot of pre-leaks coming out talking about some of the new gadgets. E-Readers and Tablets , and mini projectors seem to be talked about everywhere.

Thinking back, I got my first tablet computer in 2002. Now 8 years later I see people get all excited about a tablet and I just have trouble joining them until I hear the "Wow". Rumors are everywhere that Apple will announce a tablet/ slate whatever later in the month and Ballmer will show off a Microsoft one later tonight in his keynote. The tablet announcements themselves are a who cares event. When you should get excited is when they announce they have an experience that allows you to easily go from your phone, to your e-reader/tablet, to your net book - laptop and finally the desktop sitting somewhere in your house and finally for good measure your TV all with a unified transparent experience. Just as you wouldn't hammer a nail in with a screw driver it's all about using the write tool for the right task. But now were taking it a step further to talk about having a transportable user experience that flows across the different devices in without intervention to the user. This impacts not only the hardware but the applications we all build on the platforms. In the new decade, I think there will be a lot of focus on this convergence of the devices and improving the ease of use. For those of us that build applications that means it's time to move on from just thinking about how to make applications more responsive to how to make applications ready to provide that transportable user experience across their device of choice.

Steve Ballmer in getting warmed up for his keynote tonight did a guest blog post on the Huffington Post that you can read here. He too talks about the connections and convergence that is happening and how it will expand to reach 4 billion people in the future. In his keynote I expect him to really drive home Microsoft's position on the connected, converging world we are heading towards. As someone who builds applications I'm particularly excited about the fact that Microsoft via .NET can build on these different devices without having to start from scratch to learn something new. In the future as Silverlight comes to mobile and other non traditional computer devices it will allow more applications to conform to how people want to use applications - that is on the device that makes sense at any given point in time. Last decade was about using the web to reach people everywhere, this next decade will be about reaching all their connected devices. Are you ready? Is your application ready?

I will be covering Ballmer's keynote tonight via Twitter ( ) and if you reach out and let me know what you're interested in will try to keep my eye out.

That's all for now, I will let you know if I find the WIFI enabled toaster!


TailSpin – AuthorizationManager Check Failed

 TailSpin is one of the demo applications from PDC09 that is up on Codeplex that demonstrates a lot of the .NET 4 feature set.  I was trying to get it to run today on one of my laptops and it just wouldn’t get past the dependency check – Turns out I was dead in the water before I begun since I didn’t unblock the zip.  So what I got when I tried to run the dependency check is the following error:



I found a lot of help around how to adjust my execution policy etc…but nothing seemed to help.  Finally ran across a forum post somewhere suggesting the issue was unblocking the zip…I’m sure that “Blocking” has saved me from something terrible at some point but it sure does cause me problems at times!  So if you download Tailspin to check it out, make sure you unblock it before you try to configure it – you can unblock it on the property page of the file as you see below.



Working Around a SharePoint 2010 Install Bug

Yesterday I was trying to install the new SharePoint 2010 beta on a virtual machine and had a little bit of fun.  Well actually the install went really easy and I started with the full SharePoint 2010 Enterprise Beta.  The fun started with the configuration wizard it got 5 steps in and failed with a Timeout Exception.

After simply retrying it and getting the same thing I started looking around and found this forum post.  It talks about lack of memory and how SharePoint 2010 needs a lot of memory to install and I tried like mad to make sure the VM had enough memory.  End of the story this turned out to not be what was causing my blocking issue.  As a side note, I sure hope the SharePoint team doesn’t make it so SharePoint does need that much memory for a basic install as suggested. 

There is a good blog post by Jie Li that was linked to by the above forum post that was helpful.  First it had the product keys – Microsoft mailed me some but it took over 24 hours for me to get them (same ones) and nothing on the download pages really told me where to find them (at least I didn’t see it).  The post also has some hotfixes that you have to have depending on your OS and configuration.  Additionally, if your running on a domain controller which I was it had some setup to get the sandbox up and running.

Now back to the timeout exception, it was still happening and honestly if I didn’t need SharePoint for something I’m working on I would have thrown it to the side and not looked back.  Being determined I tried several different memory configurations and determined it had nothing to do with memory, and further through SQL profiling determined it wasn’t a database timeout either.  

From this forum post I got the idea it might be a service start up issue.  Originally, I didn’t pay enough attention to this post because it talked about a type not loading witch didn’t match my error.  Later in the post it talks about service not starting and to try it manually, that didn’t show the error either.  Additionally, it talked about registry keys to delete which turned out I didn’t have those keys.  Getting frustrated and desperate to get this configured I started to get more creative.  Since I was on a virtual machine I figured worse case I restart from last snapshot so I got brave and deleted a key at a time.  For me the following key did the trick and the config zoomed along past the error to a successful completion.

So which key?  Inside the following registry path..

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\14.0\WSS\Services\

I deleted the following key


I’m normally not one to post about or suggest this type of black magic fix, but in this case it made the difference of me using the beta or not so here it is.


Rocky Mountain Tech Trifecta v2.0 Registration Open

Registration has now opened for this years Rocky Mountain Tech Trifecta.  This years all day event will be Feb 27th in Denver, Colorado at  Metro State College Denver.  If your not in Colorado – Don’t stop reading yet – last year we had people attend from 9 different states.  Remember in Colorado it is possible to do this on Saturday and snowboard on Sunday.  For those of you that don’t ski/snowboard I’ve been told there’s good shopping near by as well.

The event will have three tracks for Developers, SQL and IT Pros.

Don’t wait to register – last years event we got real close to having to close off registration.  That was before anyone believed a good event could happen in Denver!  If you think you can make it get registered soon to save your spot.  You can register on the event site here. It’s a free event so you can’t complain about cost even if you have to by a cheap flight to Colorado!  More details can be found on which will keep being updated as we get closer to the event.

Last years event had over 400 people attend covering over 40 topics.  It also had some other interesting facts (stolen from Julies post )

936 slices of pizza eaten

2,550 minutes of technical knowledge shared

4,000 Curious George fruit snack pieces consumed

5,670 oz of soda that was consumed

Oh and my favorite “18 guys named Dave” – maybe this year we can get over 20!

So why are you still here – go register.


RIA Services How to Load Only If Authenticated

One of the things I ran into in converting to the PDC release of WCF RIA Services is around error handling in the Domain Data Source.  By default the PDC release handles error handling a little different than prior release in a good way.  Previously, if you encountered an error and didn’t explicitly provide error handling it would silently sweep the error under the carpet.  This worked great for demo applications because you could typically not worry about it.  For real applications though this lead to not knowing what was wrong and the user left wondering why nothing was showing.

Now in the PDC release the error will be raised unless you handle it.  This means that if there are times where you expect to encounter an error you need to make accommodations otherwise an unhandled exception will be raised.  A good example of this is if you have marked your Domain Service as requiring authentication by adding the RequiresAuthentication attribute.  This attribute will ensure that nobody accesses your Domain Service that isn’t authenticated.  The result though is now if your application attempts to make a call to the Domain Service before authentication is completed you will get an error.

Where I hit this was I had a couple of Domain Data Source controls in one application that was set to auto load for the main page.  There’s a few different ways to handle this but I wanted to share on that I was exploring to make it easy to handle this type of situation.  The behavior I want is to have the Domain Data Source auto load but only if the user is authenticated.  I could do this by turning off the auto load and manually calling the load once the user is authenticated.  Another option is I could make Domain Data Source a little more smart to handle these by adding a OnlyIfAuthenticated property that would be checked during the loaded event.

I’m able to do this because I have a class SLRIADomainDataSource that inherits from DomainDataSource and allows me a place to put my custom logic that I want to be on every use of the domain data source in my application.  You could also accomplish this same type of thing using behaviors.  Both approaches are viable they just depend on how you enable the feature to work.  One you add a property, the other you add the markup necessary to attach the behavior to the control.  Behaviors require you to know the class exist where the inherited class the property just shows up in the property designer making it easy to enable.  Behaviors are nice because they allow you to add logic to another control that you don’t own or is sealed.

So the following is the class were working with – notice it inherits from DomainDatasource.  Also we have already hooked into the LoadingData event to allow us get control when the control is about to load data.  The LoadingData method is called prior to the query happening so it’s the ideal place if we want to cancel it being performed.  This is also where you would hook in to handle other pre-query type errors related to query composition.

public class SLRIADomainDataSource : DomainDataSource
        public SLRIADomainDataSource()
            this.LoadingData += new EventHandler<LoadingDataEventArgs>


Next, we are going to implement the handler for the LoadingData event.  In this handler we will check OnlyIfAuthenticated to see if we have configured the Domain Data Source to only load if the user is authenticated.  From the WebContextBase class we can access the status of the user to see if they are authenticated yet.  If they aren’t authenticated we simply mark the query canceled in the event arguments.

void SLRIADomainDataSource_LoadingData(object sender, LoadingDataEventArgs e)
    if (OnlyIfAuthenticated)
        if (!WebContextBase.Current.Authentication.User.Identity.IsAuthenticated)
            e.Cancel = true;

In case your wondering WebContextBase used to be RiaContextBase in the prior CTP release of RIA Services and has just been renamed.

So with this additional logic the page developer doesn’t have to worry about special code each time to decide if the query should be started.  You also won’t get un-expected errors if the domain data source tries to call the service when the user is not authenticated.   The error handling in the new release of RIA Services is a welcome change to prevent silent errors from happening.  It is also a little more consistent and intuitive in how the errors are presented so you don’t have to hook into as many places.


New Silverlight 4 Book Content

Today we are happy to be able to announce the availability of some Silverlight 4 book content. For existing Silverlight developers looking to get up to speed quickly with the features we are releasing the Silverlight 4 Overview. This is a little over 50 pages of content covering the new Silverlight 4 features.  For the rest of this week using code SL4DaveBlog at checkout you can get the new Silverlight 4 content for only $5 almost half off the normal price.  More details on the book site

For developers that are new to Silverlight but are comfortable with .NET we are releasing a preview of Silverlight 4 Jumpstart. Silverlight 4 Jumpstart content builds on the success of the Silverlight 3 Jumpstart book to offer content focused at the business .NET developer.

Both of these offerings are available today and will continue to evolve with the Silverlight 4 release. These are delivered in an electronic format (PDF) and will continue to be updated with more current releases of Silverlight 4.


The following is an excerpt from the Silverlight 4 Overview chapter that is available as part of Silverlight 4 Jumpstart Preview book or as a standalone chapter from The full overview chapter covers all the major new features of Silverlight 4 to help you get up to speed quickly.

Microsoft has fast tracked Silverlight to be a strong competitor in the global RIA space and squarely positioned itself against competitors like Adobe, Google and Yahoo for production of the finest RIA toolset. The initial battleground was video, but we are now seeing Silverlight has strong potential for building business applications as well. We have tried through the previous chapters to streamline your learning of the current version of Silverlight by focusing on the key areas a business developer needs to know. Now it’s time to talk about the future and what the road ahead looks like for Silverlight.

It had only been about nine months since Silverlight 2 was released in October 2008 that Silverlight 3 hit the street in July 2009. Then, just four months after the release of Silverlight 3 Microsoft released Silverlight 4 Beta at its Professional Developer Conference in November 2009. Each of these releases build on the prior one to add new features while at the same time keeping compatibility to support this fast pace of innovation.

If I had to pick a single theme for the main items that are part of Silverlight 4 I would have to choose “You Asked, Microsoft built it”. I say that because many of the items like Printing or Web Camera/Microphone support for example were some of the highest user prioritized features. You can check that out for yourself at and while you’re there add or vote on a couple of your requests.

Silverlight 4 is also a major deal because it’s the first release of Silverlight to support .NET 4 CLR (Common Language Runtime). This gives developers access to the latest runtime features that are added to CLR4 including things like dynamic object support.

In addition to the core Silverlight 4 Beta, Microsoft also released corresponding updates to the other tools and products used with Silverlight. The tools for working with Silverlight from within Visual Studio were updated to support the Silverlight 4 Beta. This includes increased designer support to make it easier to develop Silverlight applications without having to leave Visual Studio for a separate tool. A new version of the Silverlight Toolkit was also released that goes along with the Silverlight 4 update. An update was also released for .NET RIA Services which has now been renamed as WCF RIA Services to reflect the fact that it now rides on top of WCF. This is an evolution of the prior .NET RIA Services releases and positions it to leverage WCF as a foundation to build on going forward. In addition to the WCF change a number of additional features such as improved inheritance support were added to WCF RIA Services in this release. Finally, a preview release of Blend for .NET 4 was released to allow it to work with Silverlight 4.
In the rest of this chapter we are going to preview some of these features that you will see in the Silverlight 4 Beta release.

Web Camera / Microphone Support

Silverlight 4 now allows developers to access to the raw audio and video streams on the local machine from applications running both in and out of the browser. Using these capabilities developers can write applications including capture and collaboration using audio and video. This is built-in to the core runtime and no other special downloads are required on each machine. When the audio or video is accessed for the first time by the application the user will be prompted to approve the request. This ensures that audio and video is never accessed without the user’s knowledge preventing applications that capture silently in the background. The following is an example of the prompt the user sees when the application requests access to the devices.


You will notice in the above image the site name is displayed. This is another safeguard to ensure the user knows which site is requesting access to the devices. Access is granted to just this application and only for this session of the application. Currently there is no option to persist the user’s approval to avoid re-prompting each time the application is run. Additionally, it’s all or nothing; you don’t get to choose video or microphone. It’s a combined approval.

Users with multiple devices can select the devices they want to be the default devices using the properties on the Silverlight plug-in. This can be selected by right-clicking on a Silverlight application and going to the Webcam/Mic tab.

The following is an example of what you will see on that tab.choosedefaultmic

Developers can get access to the chosen devices using the CaptureDeviceConfiguration class. Using this class you can call the GetDefaultAudioCaptureDevice or GetDefaultVideoCaptureDevice methods to retrieve the users selected defaults. The class also has GetAvailableAudioCaptureDevices and GetAvailableVideoCaptureDevices methods that allow you to enumerate the available devices if you want more control of choosing a device besides the default.

Prior to using the devices you must request access to the device by calling the RequestDeviceAccess() method from the CaptureDeviceConfiguration class. When this method is called it is responsible for showing the user approval dialog we saw earlier. This method must be called from a user initiated event handler like the event handler for a button click event. If you call it at other times it will either not do anything or produce an error. Using the AllowedDeviceAccess property you can query if access has already been granted to the device.

The quickest way to get started using the video is to attach the capture from the device to a VideoBrush and then use the brush to paint the background of a border. The following XAML sets up the button to trigger the capture and a border that we will paint with a video brush.


<Button x:Name="btnStartvideo" Click="btnStartvideo_Click"

Content="Start Video"></Button>

<Border x:Name="borderVideo" Height="200" Width="200"></Border>


Next, the following private method TurnOnVideo method is called from the handler for the click event on the button. This satisfies the requirement to be user initiated.

private void TurnOnVideo()


VideoCaptureDevice videoCap =


AudioCaptureDevice audioCap =


CaptureSource capsource = new CaptureSource();

capsource.AudioCaptureDevice = audioCap;

capsource.VideoCaptureDevice = videoCap;

if (CaptureDeviceConfiguration.AllowedDeviceAccess

|| CaptureDeviceConfiguration.RequestDeviceAccess())



VideoBrush vidBrush = new VideoBrush();


borderVideo.Background = vidBrush;



As you can see in the code above, default audio and video devices are retrieved and assigned to a CaptureSource. Access to the devices is then checked and requested if not already approved.

If access is granted the Start() method on the CaptureSource is invoked to begin capturing audio and video. Finally, the VideoBrush source is set to the CaptureSource instance and the background on the border is set to the VideoBrush.

Overtime we will probably see some very interesting applications of the audio and video support. One example that we put together was using it with Microsoft Dynamics CRM. In this example application a membership application was simulated that associated members with pictures and stored the pictures in a database. Think of a place similar to Costco, Sam’s Club or your local gym that snaps your photo for their records.

In the following image you can see how a tab has been added to the Contact form using the CRM customization capabilities.



A Silverlight 4 application is then hosted inside that tab that will provide the user experience for capturing the images. When the Start Camera button is clicked the user will be prompted to approve the access and the video feed will begin as you can see below.


The video feed will keep showing the live image updated from the web cam until stopped. The Capture button on the above application allows the user to capture one of the image frames from the capture source. The AsyncCaptureImage(..) method on the CaptureSource class allows you to request that a frame be captured and your callback invoked. The callback is then invoked and passed a WriteableBitmap representing the captured frame.


This image can then be saved back to the Dynamics CRM server and associated with the record being viewed.

In the above example we looked at how you could use the video capabilities to capture a static image. More advanced applications are also possible for things like collaboration by showing the real time audio and video feed of multiple users.

You have been reading about one of the many new and exciting features of Silverlight 4 that are covered in the complete overview chapter. Visit today to access the full chapter.


Cloud Computing Meets the Tax Man

Friday I got a nice surprise e-mail from the Azure team - “Action Required : Migrating Applications from the “USA – Northwest” – it continued to let me know that the northwest region will no longer be supported.  It suggested that I delete my project and re-create it using the south west region.  Ideally I would prefer they just handle it, but since Azure is still in CTP mode I will cut them a little slack. 

Looking into this a little more I found some more clear details on the Azure team blog here.  It explains “Due to a change in local tax laws, we’ve decided to migrate Windows Azure applications out of our northwest data center“  

You might notice the blog post is dated August – not sure if I saw that and thought it didn’t apply or never read it.  Either way, from my perspective most the time I don’t care if my data is in the South / North, East, West  - I do tend to care which country it’s in but besides that I just want it to be handled behind the scenes.  There are however good reasons to allow some control over the specific location when the application and / or business needs dictate.  It would be great to see Azure provide some tools to allow you to migrate data as needed between the regions.

As more applications move to have data hosted in the cloud we can only expect more skirmishes to occur with the taxing authorities as they wrestle to figure out a balance between getting their fair share of taxes and pushing businesses away.  This article on the Data Center Knowledge site elaborates a little more on the specifics of the Microsoft problem with Azure here.   I suspect we also haven’t seen the end of location matters for other legal jurisdictions of data as well but that’s a topic for another day.

Part of the appeal of cloud computing is it’s ability to abstract you from some of the low level issues of hosting data and computing power.  Power, cooling, hardware expenses, taxes and more are all of the package that makes this type of arrangement interesting.  It stands to reason that companies like Microsoft will make location decisions to where there is a strategic advantage for a key component of their expenses in providing the service.  In fact,  I think that will be required for any of these companies to be competitive.  I also think that making that as non impactful to the end user is also a core requirement of offering the service as well.

Page 1 ... 3 4 5 6 7 ... 32 Next 7 Entries »