ASP.NET WebForms OAuth2 multi-tenant resource and WPF client

Most published WebAPI samples (e.g. http://msdn.microsoft.com/en-us/library/azure/dn646737.aspx) are based on the MVC and OWin infrastructure, which is not available in WebForms applications. Following is a custom implementation of an OAuth2 access token handler presented by a WPF rich client application. The WPF is responsible for managing the OAuth code grant flow to obtain the token and present […]

Using WS-Federation with Windows Store and .NET rich clients

In general, rich client apps use OAuth flow to obtain authorization tokens to a web service. However, that flow may not be available from the authentication servers. In the following I am using an alternative approach: WS-Federation, well supported by ASP.NET web services. The solution consists of a web service, often used to provide REST […]

Using Azure Queues to schedule work items

Attached sample shows how to use Azure Storage Queues to schedule processing of an item for a later point in time. It solves a common problem of scaling out a process based on iterating over a collection and processing some items based on time specific properties. Such an iteration, while easy enough to implement in a […]

OAuth2 with ADFS and WAAD using C#

Overview The following summarizes the process of creating an end-to-end OAuth2 sample using ADFS 2.1 (or Windows Azure Active Directory). Web site setup Use the VS.NET 2012 ASP.NET MVC 4 WebAPI project template to setup your server project. Token handling To process the incoming JWT token open the global.asax class and add to it the […]

Migrating C# DLL Library to WinRT Component project

In order to make the functionality of your C# or VB.NET class library (DLL) available to other WinRT languages (C++, JavaScript) you need to convert it to a WinRT component (http://msdn.microsoft.com/en-us/library/windows/apps/br230301.aspx). The referenced MSDN article lists the areas where coding for a component and a library is different. Here are some ‘best practices’ I found […]

Some experience migrating Silverlight graphical apps to Windows 8 Store

Recently, I had the opportunity to migrate a Silverlight application to Windows 8 Store. The application is highly graphical, showing a variety of images or symbols representing real-world objects and allowing the user to interact with these objects and view their state (Human Machine Interface). Therefore its navigation and interaction paradigm is largely the same […]

WPF Data Binding error 2: Cannot find governing FrameworkElement…

I got this error when trying to bind to a collection element, which was not derived from the FrameworkElement (just DependencyObject) and was thus not inheriting it’s container’s DataContext, e.g. <Grid>   <Grid.DataContext>      <loc:MyViewModel />   </Grid.DataContext>   <igRibbon:XamRibbon Grid.Row=”0″ x:Name=”ribbon”>      <igRibbon:XamRibbon.ContextualTabGroups>         <igRibbon:ContextualTabGroup Key=”SelectionGroup” Caption=”Contextual Tabs” IsVisible=”{Binding IsContextualTabVisible}”>             <igRibbon:ContextualTabGroup.Tabs> I tried replaing the binding with ElementName=ribbon,Path=DataContext.IsContextualTabVisible but that […]

Sticky Azure WCF service roles

In general, sticky connectivity should be avoided when creating Azure-based services. However, there are situations, e.g. migration of a legacy application which relies on stickiness where it would be good to be able to support it. Here is a solution to providing stickiness to WCF services hosted in Azure. The solution is based on the […]