Ucodia

Code your Utopia;

Implement Simple Authorization for ASP.NET Web API

For a recent Windows Phone project I had the need of a web API that would do some processing for the mobile app. Thanks to the simplicity of ASP.NET Web API I was able to get my web service running in just a few hours. But then an issue remained: the website being deployed on Azure, the API endpoint was public. Despite the genericity of my API I wanted to be able to restrict its access only to trusted clients.

After a bit of research and some StackOverflow help, I found a satisfiying solution. A really simple mix of ASP.NET message handlers, authorization filter and API keys.

Change the Working Days/weekends in TFS 2012

By default when you install Team Foundation Server 2012, the default weekends for all of your team projects will be set on  Saturday and Sunday. These values will actually influence the way TFS will calculate the time estimation for your iterations and the way the task burndown chart is displayed, therefore you probably want to change these values in case the project is running in a country with different weekends or if you have days with no time allocated to this particular project.

Unfortunately, there is no intuitive way of changing that from the administration interface of the team project. The only way is to export the project common configuration template, edit the template and import it back through the witadmin console tool.

Advanced Reporting Services Development, Part 2: The RDL Serializer

The first article of my advanced Reporting Services development serie was covering the RDL object model. But if you already read it, in the end of this article you probably wondered how to deal with object model serialisation. Well. The answer is pretty simple: use the RdlSerializer class. Now if you search for the class documentation, you won’t find anything. If in the end you start looking into the API code using JustDecompile, you would bump into this RdlSerializer class and finally realise it is internal…

The reason why Microsoft decided to not put it in the public API is still a bit unclear to me. Being inspired by Teo Lachev’s post about the SSRS 2008 R2 object model I decided to write a RdlSerializer proxy class hacking into the original internal class.

Advanced Reporting Services Development, Part 1: The RDL Object Model

If you have ever used SQL Server Reporting Services (SSRS) you might have been developing reports using Report Builder or Business Intelligence Development Studio (BIDS). Most of time, these tools are just fine for developing reports that fits your needs or your customer requirements. But sometimes you need to build up your own reporting tool, which means you will have to get your hands dirty and inject your own reporting soup into the SSRS engine. The goal of this article serie is to show you the way to building highly customized reporting tool that will fit your needs. These articles mainly targets SSRS 2008 R2 and the Denali CTP3 version and might differ from previous versions.

First stop: the RDL object model. RDL stands for Report Language Defintion. It is a XML based language developed by Microsoft and firstly introduced with the SSRS for SQL Server 2000 release. Every SSRS object you will have to play with are defined with RDL and that is why both the BIDS report designer and Report Builder are using the Microsoft.ReportingServices.RdlObjectModel namespace to build them up. Now let’s have a look on how we can take advantage of this model and go beyond the designers functionalities.

Get the Full List of Windows Supported Countries With C#

When developing the LocaliZune settings editor, one of the challenge was to display a full list of Windows countries to the user. My first approach to meet this challenge was to retrieve a list of countries using the CultureInfo.GetCultures() method and then get all the country information following this example. But I quickly realised that a lot of countries were missing from the list and that it does not matched the country list from control panel location setting. I investigated more deeply on how I could provide the full list of countries supported by the system.

These investigations finally led me to the ultimate solution: invoking EnumSystemGeoID and GetGeoInfo from kernel32 system library.