Windows Phone 7, Animations and Data Binding

While working on one of my WP7 applications I noticed a weird problem with the animations. The app is pretty simple with just two pages. I added the same page load animation, see below, to both pages and all seemed to work just fine. <phone:PhoneApplicationPage.Projection> <PlaneProjection x:Name="plane" CenterOfRotationX="0"/> </phone:PhoneApplicationPage.Projection> <phone:PhoneApplicationPage.Triggers> <EventTrigger> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetName="plane" Storyboard.TargetProperty="RotationY" From="-90" To="0" Duration="0:0:0.5"/> </Storyboard> </BeginStoryboard> </EventTrigger> </phone:PhoneApplicationPage.Triggers> The animation causes the page to rotate in and is something I copied from Charles Petzold eBook Programming Windows Phone 7 although I shortened the time to just half a second. While developing everything worked just fine … Continue reading Windows Phone 7, Animations and Data Binding

Configuring ASP.NET Session State to use AppFabric Caching

If you are using the information in this MSDN page to get started with the ASP.NET Session State Provider to use Windows Server AppFabric Caching you might run into some problems as the steps are less than complete. First make sure you have Windows Server AppFabric Caching setup and working and add the configSections and dataCacheClient elements as specified. If you next add the sessionState element as specified you will receive the following error: Parser Error Message: Could not load type ‘Microsoft.ApplicationServer.Caching.DataCacheSessionStoreProvider’ The reason is the assembly information is not specified so the .NET runtime doesn’t know where to find … Continue reading Configuring ASP.NET Session State to use AppFabric Caching

Keyboard and the Windows Phone 7 emulator

By default the WP7 emulator will not react to you typing on the keyboard, instead you have to use the mouse to press keys on the software keyboard that pops up. There is however a hidden feature that will let you use your hardware keyboard, just press Page Up when the software keyboard pops up. And as an extra bonus the three buttons at the bottom of the phone can be activated using F1, F2 and F3 for back, home and search respectively.   Cool feature that makes development using the emulator a lot easier   Enjoy! [f1] [f2]

Calling Workflow Services without Add Service Reference

Sometimes you just don’t want to do an Add Service reference in the client application but still be able to to call a WF4 workflow service. The good thing is that a WF4 workflow service is just another WCF service from the client perspective so almost everything you can do with a regular WCF service you can also do with a workflow service. And calling the service without doing an Add Service Reference first is one of those things. In these examples I am going to use the default workflow service template just to make it easy to get started. … Continue reading Calling Workflow Services without Add Service Reference

Throttling workflow services in WF4

Windows Workflow Foundation 4 makes it real easy to create workflow services that do long running work on a server. However when we are doing long running work there could be an issue with lots of workflows being started and too many workflow instances competing for the same data and threads thereby causing problems like database timeouts or thread pool starvation. To simulate a busy workflow service I have the following sample workflow: The workflow service is started using a WCF request, returns a response, prints a start message, does some work and prints a message that it is done. … Continue reading Throttling workflow services in WF4

Versioning long running Workflow Services in WF4, the code

In my previous WF4 post I described the principal of how to version workflow services using the WCF 4 RoutingService. In that post I described the general problem and solution without going into a lot of detail and showing any code. In this blog post I will add an actual implementation you can use for reference purposes.   The basic layout The solution has three parts. The workflow service with 2 different versions of same workflow. The second version of the workflow has more activities in the tree so it can’t load workflow instances from version 1. Each workflow is … Continue reading Versioning long running Workflow Services in WF4, the code

Versioning long running Workflow Services in WF4

One of the problems with the current version of Windows Workflow Foundation is how to handle different versions of your workflows. With short running workflows this is no big deal, workflows do whatever they are supposed to do and finish, and you can deploy a newer updated version of your XAMLX files whenever you want. Provided the public facing SOAP interface doesn’t change no one will notice a difference and everything will work just fine. However as soon as we get into long running workflows and the SQL Workflow Instance Store things get quite a bit more complicated. As soon … Continue reading Versioning long running Workflow Services in WF4

Book review: Silverlight 4 in Action

Some weeks ago I received a review copy of Silverlight 4 in Action by Pete Brown. Reviewing this book took some time as it weighs in at a hefty 798 pages, who ever said that Silverlight was a small products? That is a lot of material but then the book doesn’t assume any prior knowledge of Silverlight at all.   The book is divided into 25 chapters in 3 different sections. The first part, consisting of 10 chapters, is titled "Introducing Silverlight". As the name suggests this covers the basics of Silverlight development. This section is mostly targeted at developers … Continue reading Book review: Silverlight 4 in Action

Limiting which user can access service using the Windows Identity Foundation

In my previous blog post I demonstrated how to secure a workflow service using the Windows Identity Foundation. With this in place we only allow users that are trusted by the STS Dominick Baier wrote. That is nice but in some cases we might not want all users to be able to perform all actions.   How can we check for individual users against a specific action? Using an STS we don’t get the user credentials from the client application but we do get a lot of information in the form of security tokens from the STS my means of … Continue reading Limiting which user can access service using the Windows Identity Foundation

Securing a Workflow Service using Windows Identity Foundation

The way security is often still handled these days with each application keeping track of their own users is somewhat dated. Some form of Federated security, where a single separate server is responsible for the security of a whole series of applications, is the way to go. On the internet there are plenty of examples of this with applications using things like OAuth and leaving their security to others. In windows the preferred form of federated security is through Windows Identity Foundation and it is real easy to secure an ASP.NET site or WCF service using Windows Identity Foundation.   … Continue reading Securing a Workflow Service using Windows Identity Foundation