Tuesday, May 31, 2011

Console Application fails on Windows Azure

Last week I was trying to add a console application as a startup task to a Windows Azure project. However each time the startup task was executed it failed with the following error

“Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.”

It took me some time to figure out that the issue was caused by the Microsoft.WindowsAzure.ServiceRuntime dll which is a mixed mode assembly. When I  commented out some code and removed this DLL reference, everything worked.

So what can you do to solve this error?

  • Option 1: Compile your application against the .NET 3.5 framework instead of .NET 4.0.
  • Option 2: Add a "useLegacyV2RuntimeActivationPolicy" to the startup tag generated in the default app.config:
<startup useLegacyV2RuntimeActivationPolicy="true">

The useLegacyV2RuntimeActivationPolicy attribute is required for referencing any mixed mode assembly.

Monday, May 30, 2011

Fun Scrum story: Enable and equip your product owners

With the commercialization of Scrum and way too many Scrum but… implementations, I’m happy to read that there are still successful Scrum stories out there.

Let me show you one picture from the article:

Curious about what’s going on? Read the full story at http://agilescout.com/enable-and-equip-your-product-owners/.

Saturday, May 28, 2011

The power of jQuery: 50 impressive tutorials

Thanks to jQuery, I’m having a renewed interest in Javascript development. Although not everything is as obvious as I would like in Javascript, I’m really loving the way that jQuery simplifies the client side development experience.

Last week I found the following link with 50 jQuery tutorials, all amazing samples of the power that jQuery offers to the user.  I’m really impressed about some of the samples and the introduction of HTML 5 will push the limit even further.

Some of the samples:

jquery tutorials

jquery tutorials

jquery tutorials

Check them all out here: http://css.dzone.com/articles/50-fresh-jquery-tutorials-2011

Friday, May 27, 2011

Building Azure solutions on your build server

Out-of-the-box building your Azure projects on the build server will fail. You probably get an error like below:

c:\builds\AzureProject\AzureProject1.ccproj(57,11): error MSB4019: The imported project "C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0\Microsoft.CloudService.targets" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

Probably the easiest solution is to install the Windows Azure SDK on your build server. However the SDK installer checks if some components like Visual Studio, IIS, … are available on the server. You can start to install all these components, but then you are polluting your clean build environment.

So what is a (better) alternative?

The solution we used was to just copy the necessary files and components. This means:

  • Copying the files under  C:\Program Files\MSBuild\Microsoft\Cloud Service\v1.0\ to the same location on your build server.( Program Files(x86) if you are on a 64bit system)
  • Copying the files under “C:\Program Files\Windows Azure SDK\v1.0\bin" to your build server.
  • As a last step, you’ll have to update the registry because the Microsoft.CloudService.targets file searches for the following keys:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@InstallPath
    • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\ServiceHosting\v1.0@ToolsVersionSupportLevel
  • Export these registry keys and import them on your build server.

That did the trick for us. Anyone with a better solution?

Thursday, May 26, 2011

Copy a DLL from the GAC

Need a DLL but you don’t know the exact location? Instead of searching through all your folders, just extract it from the Global Assembly Cache(GAC).

  • Open a command prompt(as an administrator)
    • run > cmd
  • Navigate to assembly and gac folder
    • cd windows\assembly\gac
  • Navigate further down to the desired assembly >
    • dir <assembly name initials>
    • cd <assembly name>
  • Keep on doing this until you find the required .dll file
  • Then copy it
    • copy <assembly dll> C:\temp\

Simple and effective!

Wednesday, May 25, 2011


IE9 contains a nice feature, called Pinned sites. Pinned sites unlock a new set of tools—Favicons, Notifications, Jump Lists, and Thumbnail Toolbars for your IE 9 site inside Windows 7. Although not really a platform independent feature, I still like it.

With just a few lines of HTML or JavaScript code, you can use these tools to take advantage of the full power of the PC and extend the web experience beyond the browser and onto the Windows 7 taskbar.

If these few lines are still too much for you, have a look at Pinify. It’s a jQuery plugin that simplies the process of adding the pinning functionality to your website. And what’s even nicer is that it does all the browser compatibility checks for you.

A quick code sample:

<script src="Scripts/jquery-1.5.2.js" type="text/javascript"></script>
<script src="Scripts/jquery.pinify.js" type="text/javascript"></script><script type="text/javascript">
$().ready(function ()
applicationName: 'PizzaPlanet',
tooltip: 'The best pizza's of the universe',
tasks: [{
'name': 'Order a pizza',
'action': 'http://pizzaplanet/order',
'icon': 'order.ico' },
'name': 'Where's my pizza?',
'action': 'http://pizzaplanet/location',
'icon': 'location.ico' },

Tuesday, May 24, 2011

Deploy ASP.NET MVC 3 application to Windows Azure

Although I had installed ASP.NET MVC applications on Windows Azure before, I had some problems last week getting everything up and running. The problem was that I switched from the WebForms view engine to Razor. It seems that Razor requires a lot of extra DLL’s that should be installed on your web role.


So to simplify this process next time, a reminder for myself. If you are using ASP.NET MVC 3 together with Razor, check that following references are added:

  • System.Web.Mvc.dll
  • Microsoft.Web.Infrastructure
  • System.Web.Helpers
  • System.Web.Razor
  • System.Web.WebPages
  • System.Web.WebPages.Deployment
  • System.Web.WebPages.Razor

Afterwards check that “Copy Local” is  “True” for all above modules, like as below:


Monday, May 23, 2011

ALM vNext

Last week at Teched North America, Jason Zanders  announced during the keynote the vision for Application Lifecycle Management (ALM) in the next version of Visual Studio.

By adding support for testers into Team Foundation Server 2010, TFS becomes more and more a collaboration tool. Microsoft continues on this path by incorporating two additional important roles: stakeholders and operations. There are a number of scenarios that span the next version of Visual Studio for ALM. These scenarios improve the creation, maintenance and support of software solutions by focusing on improving the workflow across the entire team as well as across the entire lifecycle.

  • Agile Planning Tools – create transparency across the planning process and full team participation through solutions like the new backlog and task board.
  • Lightweight Requirements – a natural way to capture and receive feedback on requirements early in the process.
  • Stakeholder Feedback – working code which matches the expectations of stakeholders.
  • Continuous Testing – unit test coverage ensures quality in the final product.
  • Agile Quality Assurance – increased code quality with code review support, enhanced unit testing frameworks and new exploratory testing support.
  • Enhanced User Experience – more time ‘in the zone’, through improved experiences for day-to-day tasks.
  • Aligning Development with Operations – increased connections and insight between the operations and development teams lowering the time it takes to fix a bug in production.

Find Out More

The “Visual Studio vNext: Application Lifecycle Management” whitepaper is available today. This is a comprehensive whitepaper that covers these topics in much more detail.

Additional helpful links to get you started can be found on the following websites:

Saturday, May 21, 2011

Clear DNS cache in Windows 7

  • Open a command prompt window (as an administrator)
  • Type ipconfig /flushdns 
  • Hit Enter

Easy once you know it…

Friday, May 20, 2011

Use Fiddler with the Windows Phone 7 emulator

If you didn’t know it yet, I’ve build my own WP7 application. As I’m using oData in the backend, Fiddler is an invaluable tool that helps me debugging all the web traffic. However there is one problem, Fiddler doesn’t seem to work with the Windows Phone 7 emulator.

I solved the problem by executing following steps mentioned on Eric Laws blog:

  1. Start Fiddler.
  2. Click Tools > Fiddler Options.
  3. Open the Connections tab and tick the Allow remote computers to connect box
  4. Click OK to close the Fiddler Options dialog.
  5. In the QuickExec box under the session list, type prefs set fiddler.network.proxy.registrationhostname HostName where HostName is the name of your desktop computer.
  6. Close and restart Fiddler.
  7. Start (or restart) the Windows Phone 7 Emulator.
  8. Open Internet Explorer on the Emulator.
  9. Observe, your traffic shows in Fiddler.

Thursday, May 19, 2011

Windows Azure Service Dashboard

If you are a little suspicious about the state of your Azure datacenter(especially after the recent debacle with Amazon), you can check the current state of the Azure datacenters on the Windows Azure Dashboard page.


Exporting Microsoft Test Manager Test Results to Word

With the release of Visual Studio 2010 Microsoft introduced a new Visual Studio version called Microsoft Visual Studio Test Professional 2010. This version includes a tool called Microsoft Test Manager that is also a part of the Visual Studio 2010 Ultimate installation.

Although it is a really great tool that simplifies the work of the tester a lot, it still has some missing features. One of the areas where it lacks in functionality is reporting. There is no easy way to export the tests, test results, and so on in an easy to use format. Luckily there is a tool named Test Scribe  that allows you to see Test Plan, Test Results, Test Suites, Test Cases, Test Configurations, Test Settings in a Word document which you can also print out.

If you didn’t install it yet, go do that first.

Using Test Scribe

  • Open Microsoft Test Manager
  • Click on the Testing Center dropdown
  • A new option Tools is added to the drop down list. Select it.


  • Click on Test Plan Summary
  • Select/Highlight a Test Plan
  • Click on the Generate Button


  • The Test Plan document will display the following Test Plan details, Test Suite details, Test Case details, and Test Configuration details

Wednesday, May 18, 2011

Monitor your Team Foundation Server data volumes

Last week I had to solve a problem for a customer were the disks of their Team Foundation Server environment were filling up. One thing that can help you prevent this kind of problems is the TFS Best Practices Analyzer, which is a part of the Team Foundation Server 2010 Power Tools.

The Best Practices Analyzer can be used to monitor the health of your Team Foundation Server environment. One of the features it has is the ability to obtain usage data about the volume of data stored or accessed in the past 14 days. This includes specific information about database tables that have a tendency to grow large, and may need to be reduced in size.

To run the BPA, select Start -> All Programs -> Microsoft Team Foundation Server 2010 Power Tools -> Best Practice Analyzer.

To run a scan for the first time, click the “select options for a new scan” link. You can name the scan, and select the type of scan you want to perform:

  • Team Foundation Server Complete Health Check
  • Team Foundation Server Framework Health Check
  • Team Foundation Server Warehouse Health Check
  • Team Foundation Build Health Check
  • Visual Studio Lab Management Health Check
  • Sharepoint Products Health Check
  • Team Foundation Server Statistics

Finally, you select the Team Foundation Server you want to run against.

Tuesday, May 17, 2011

Windows Azure Toolkit for iOS

Last week Microsoft announced the release of the Windows Azure Toolkit for iOS. This toolkit contains resources and services designed to make it easier for iOS developers to use Windows Azure.

This iOS toolkit includes the following pieces:

  • A compiled Objective-C library for working with services running in Windows Azure (e.g. push notification, authN/authZ, and storage)
  • Full source code for the objective-C library (along with Xcode project file)
  • Sample iOS application that demonstrates how to use Windows Azure Storage with full source code
  • Documentation

The Windows Azure Toolkit for iOS—along with all the source code—has been released to github:




Some screen casts to get started:

Getting Started with the iOS Toolkit

Deploying the Cloud Ready Package for Devices

During this announcement, they also mentioned that they have started to work on the Windows Azure Toolkit for Android, and expect to have it ready in June. Futhermore, at TechEd North America Microsoft will ship v1.2 of the Windows Azure Toolkit for Windows Phone 7, which will include:

  • Integration with the Access Control Service (e.g. a wizard, automatic setup, tooling, and code)
  • Full support for Windows Azure Storage Queues
  • Updated UI/UX for the supporting web application

Monday, May 16, 2011

Windows Azure Diagnostics Logging

Although the logging functionality in Windows Azure uses the familiar Trace class, some extra steps are required. As I always forget them, a quick step-by-step guide:

Step 1: Adding DLL references

Remark: If you create a new cloud project and immediately add a web/worker role, the required DLL reference is already added.

Open the project you’ll host on Azure and add a reference to Microsoft.WindowsAzure.Diagnostics.dll. This is the dll that exposes the diagnostics configuration and management APIs.

Step 2: Register the Azure Diagnostics TraceListener

Remark: If you create a new cloud project and immediately add a web/worker role, the required tracelistener is already added to your configuration file.

Open your configuration file and add the following config settings:

<add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
<filter type="" />

Step 3: Configure a storage account

The diagnostics will be shipped from time to time to some specific tables inside a Windows Azure Storage account. Therefore you need to specify an Azure Storage connection string that can be used. The default VS template sets up the connection string name as ‘DiagnosticsConnectionString’ and the value as ‘UseDevelopmentStorage=true’. This particular connection string sets up Diagnostics Monitor to use Development Storage account. The connection string can be changed to point to a cloud storage account of your choice. Open up ServiceDefinition.cscfg or use the IDE to change this setting:

<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="DefaultEndpointsProtocol=https;AccountName=<accountname>;AccountKey=<key>" />

Step 4: Start the Diagnostics monitor

To enable log shipping you need to start the Diagnostics Monitor. Probably the best place to do this is inside the OnStart() method of your RoleEntryPoint class. In there add the following code:

public override bool OnStart() 
DiagnosticMonitorConfiguration dmc = DiagnosticMonitor.GetDefaultInitialConfiguration(); 
dmc.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1); 
dmc.Logs.ScheduledTransferLogLevelFilter = LogLevel.Verbose;

DiagnosticMonitor.Start("DiagnosticsConnectionString", dmc); 

This configures the Diagnostic Monitor to ship the log data every minute to the Azure Storage. You can manipulate the Diagnostic Monitor configuration from outside Windows Azure, but this is something for another blog post.

Sunday, May 15, 2011

Ordina Stand out from the crowd on May 26th

On May 26th, Ordina Belgium(the company I work for) is organizing a free technology event. Ordina’s technology specialists will give 21 30 minutes sessions, spread over 5 tracks. The event is free for everyone to join, registration is required. You can register here: www.ordina.be/differentiate.


We will have the following sessions for you to attend:

Agenda: Stand out from the crowd with Microsoft technology on May 26, 6 pm
30-minute sessions – the choice is yours

  • .Net
    Visual Studio LightSwitch
    Building a Windows Phone 7 application: lessons learned
    C#5 Async
  • SharePoint
    Automated scripted deployment of SharePoint
    SharePoint 2010: architectural overview
    Developing against SharePoint 2010 lists
  • SQL
    Where .Net meets SQL Server: SQL CLR
    Extending to multilingual reporting
    Using geo data within Report Builder 3.0
  • Application Lifecycle Management
    Automate your deployment cycle with TFS Build 2010 and Workflow 4
    Delivering quality software with TFS 2010
    Team Explorer Everywhere: TFS and Java, better together
  • Azure
    Reporting services in the cloud
    Moving a legal application in the cloud
    Windows Phone7 and the cloud
  • Infrastructure
    Unified Communications: Lync
    Unified Communications: Office 365
  • Enterprise Portfolio Management
    Demand management using workflow in Project Server 2010
    Bridging the project and work management gap

I will be talking about Windows Phone 7, Team Foundation Server 2010 and I also present our very own keynote together with Gill Cleeren.

Interested? Join us!

Saturday, May 14, 2011

WPF vNext

Although a lot of announcements were made at PDC around Silverlight 5, it remained awfully quiet on the WPF front. Last week I noticed one small interview with Rob Relyea, the Principal Program Manager Lead for WPF on InfoQ.

They elaborated a bit on the Airspace problem and the C++ support but nothing new was mentioned.

Is WPF dead?

Friday, May 13, 2011

SQL Azure Reporting

What is it?

SQL Azure Reporting enables developers to embed operational reports on information stored in a SQL Azure database, using ReportViewer in remote mode in your applications, with the cloud at your service, and no need to manage or maintain your own reporting infrastructure.

SQL Azure Reporting provides many of the features you know from SQL Server Reporting Services 2008 R2 to create your reports with tablices, charts, maps, gauges, sparklines, and more using the familiar Business Intelligence Studio, and deploy them on-premise or in the cloud. Literally take your report anywhere, and scale when and how you need it. Check out the webpage for more info, and sign up for the CTP.

How to get started?

  • Once you have signed up for the CTP, an invitation code will be send to you. Go to the Azure Management Portal(http://windows.azure.com) and click on the Reporting option on the left.


  • Click on the Provision button on the right. Accept the license agreement and click Next.


  • Select the subscription for which you want to activate SQL Azure Reporting.


  • Enter the received invitation code and a password of your choice. Click Finish to finish the wizard.


  • Now the SQL Azure Reporting functionality is activated. Drill down in the subscriptions on the left and select the Reporting Services instance. On the right you’ll see the Web Service URL and a generated username.


  • To connect to the report server, enter the following url in your browser(Don’t forget to use https):


  • Enter the generated Username and the password you used when activating the SQL Azure Reporting.  A directory listing with the created report folders and reports will be shown


  • If you want to create your own reports, install the Visual Studio Business Intelligence Tools for SQL Server 2008 R2, create your report and use the same url(https://<Web Service Url>/ReportServer when deploying your report.

Thursday, May 12, 2011

Microsoft Web Camps Training Kit

The Web Camps Training Kit includes all the content presented around the world at the Web Camps events; presentations, demos, labs and more. Inside you'll find content that covers the following technologies ASP.NET MVC 3, jQuery, IE 9 and HTML5, OData, Web Apps, WebMatrix and more!
Web Camps
You’ll find the training kit for download here: http://trainingkit.webcamps.ms/Default.htm

Wednesday, May 11, 2011

WP7 Tombstoning

In the current version of the Windows Phone only one application a time is allowed to run inside the sandbox. While some applications have the ability to run in the background, they are specialized applications that do not run in 'the sandbox'. Our own applications have to live without background processing. 

So how do you know if your application is running or not? The answer is simple. For your application to be running, it has to be focused to the screen. In other words, if you can't see your application, it isn't running.

Switching away from your application can happen on a number of different cases including:

  • User Presses Back from the first page of your application.
  • User Presses the Home or Search button.
  • User responds to a 'toast' notification.
  • Interruption activity occurs (e.g. Phone call).

The fact that your application stops running is called 'tombstoning'. When your application is going to be tombstoned it enters a paused state where your application will be given an opportunity to temporary state. This saving of data is not to isolated storage but an in-memory store so that when your application is suspended it can be unloaded if necessary by the phone. If the user returns to your application (e.g. from the back key), your application is resumed which gives you the opportunity to take that temporary state and return your application to the same place it was when it was paused. The user should not notice this change. The whole idea here is to give you an opportunity to give the user a seamless transition from paused and resume without them knowing that the application was killed.

However this temporarily saving of the application state is not done automatically and should be implemented yourself. One library that simplifies this process is the WP7 TombStone Helper. This library adds extension methods to PhoneApplicationPage so you don't have to worry about maintaining the state of a page in your app if it gets tombstoned.

With just two lines of code the contents, checked state and scroll positions of TextBoxes, PasswordBoxes, CheckBoxes, RadioButtons, Sliders, ListBoxes and ScrollViewers will be preserved.

protected override void OnNavigatedFrom(System.Windows.Navigation.NavigationEventArgs e)


protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)


Tuesday, May 10, 2011

Climbing Mt. PowerShell

Do you want to learn Powershell in a fun and easy way? Have a look at the  "Climbing Mt. PowerShell" technology comic book. It"’s very well written and the comic book style makes it attractive and an enjoyable reading experience. Next time, I have to write some documentation, I’ll will be doing it in comic style too Winking smile



Download Climbing Mt. PowerShell (2.2 MB)

Monday, May 9, 2011

Entity Framework 4.1 Problem

One of the great improvements of Entity Framework 4.1 is the introduction of conventions. Unfortunately due to some time constraints the EF team had to remove the support for customizable conventions. Still, there are some default conventions already available.

And it was one of these conventions that bit me in the foot last week. I created the following model:

public class PizzaIngredient
public int PizzaIngredientId { get; set; }
public int Price { get; set; }
public string IngredientName { get; set; }
public string Description { get; set; }

and the following context:

public class PizzaPlanetMVCContext : DbContext
public DbSet<PizzaPlanet.MVC.Models.PizzaIngredient> PizzaIngredients { get; set; }

However when running the application, the following error message was returned:

Invalid object name 'dbo.PizzaIngredients’.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'dbo.PizzaIngredients’.

The reason is that there is a default convention that defines the name of the table by pluralizing the name of the entity(PizzaIngredient –> PizzaIngredients). As I had created my database up front, my table was called PizzaIngredient which of course resulted in an invalid query.

How can you solve this?

The simplest way to solve this, is by removing this convention. Therefore open up the context class and add the following code block:

protected override void OnModelCreating(DbModelBuilder modelBuilder)

Sunday, May 8, 2011

Windows Azure Platform Offer Comparison Table

Having a hard time finding your way through all the Azure offerings? You’re not alone!

Then there is for you the Windows Azure Platform Offer Comparison Table(pfew, what a name). All the offerings on one page in an easy to understand table format.


Saturday, May 7, 2011

Windows Azure Training Kit April Update

And yes, here we are again with a new update of the Windows Azure Training kit. And with the transfer of Scott Guthrie to the Azure team, I’m expecting to see things move even faster.

What is the Training kit?

The Windows Azure Platform Training Kit includes a comprehensive set of technical content including hands-on labs, presentations, and demos that are designed to help you learn how to use the Windows Azure platform, including: Windows Azure, SQL Azure and the Windows Azure AppFabric.
The April 2011 update of the Windows Azure Platform Training Kit has been updated for Windows Azure SDK 1.4, Visual Studio 2010 SP1, includes three new HOLs, and updated HOLs and demos for the new Windows Azure AppFabric portal.

What’s changed in this update?

  • [New] Authenticating Users in a Windows Phone 7 App via ACS, OData Services and Windows Azure lab
  • [New] Windows Azure Traffic Manager lab
  • [New] Introduction to SQL Azure Reporting Services lab
  • [Updated] Connecting Apps with Windows Azure Connect lab updated for Connect refresh
  • [Updated] Windows Azure CDN lab updated for CDN refresh
  • [Updated] Introduction to the AppFabric ACS 2.0 lab updated to the production release of ACS 2.0
  • [Updated] Use ACS to Federate with Multiple Business Identity Providers lab updated to the production release of ACS 2.0
  • [Updated] Introduction to Service Bus lab updated to latest AppFabric portal experience
  • [Updated] Eventing on the Service Bus lab updated to latest AppFabric portal experience
  • [Updated] Service Remoting lab updated to latest AppFabric portal experience
  • [Updated] Rafiki demo updated to latest AppFabric portal experience
  • [Updated] Service Bus demos updated to latest AppFabric portal

Friday, May 6, 2011

Community Day 2011 is coming closer…

Never change a winning team. So yes, this year too we’ll have a  Community Day, this time on June 23rd at Utopolis Mechelen. This fifth edition will be the biggest one ever, with more sessions, the best food, great networking opportunities and the best speakers Belgian has to offer.

If you don’t know what Community Day is,  it’s a joint event of 13 Belgian user groups bringing you a lot of interesting sessions about a broad range of topics. The following user groups are part of this year’s edition:

  • AZUG
  • IT-Talks
  • Pro-Exchange
  • SCUG
  • ACCB.net/VBIB
  • Visug
  • WinSec
  • DotNetHub
  • MyTIC


  • Oh, and I almost forgot the most important fact, Community Day 2011 is a free event.

    Thursday, May 5, 2011

    Integration blog series

    Yes, we are living in a connected world. Almost no system does live in isolation. So sooner or later you are confronted with some integration scenario’s. Multiple options are out there and which one should you pick?

    Paul Stovell did a very well written blog series about this. Go check it out!

    Introducing a simple scenario where two applications need to integrate. Part of a series on integration approaches.

    One solution to application integration is for the applications to just share the same RDBMS. Let's explore the pros and cons of this approach.

    Another solution to application integration to use extract/transform/load scripts to move data between the databases.

    A third solution to our integration scenario is for one application to expose web services. How would that work?

    Different integration solutions lead to different levels of coupling. Let's explore that.

    For the fourth and final integration option, we explore the use of asynchronous messaging.

    Wednesday, May 4, 2011

    TechDays 2011: Telerik ‘Just’ announced 2 new products

    Last week I was at TechDays Belgium when I noticed the following tweet from the Telerik team:


    Curious as we are, we hurried to the Telerik booth to hear that they have released 2  new productivity tools: JustTrace and JustDecompile. JustTrace is a performance and memory profiler which can profile .NET 2.0+ (both web and desktop) and Silverlight applications.
    JustDecompile is a free tool which can decompile, and browse .NET assemblies.(read: a Reflector clone)

    I’ve just downloaded and installed both of them. So a first review will follow…

    More information and the official announcement here: http://blogs.telerik.com/blogs/posts/11-04-27/introducing_justtrace_and_justdecompile.aspx.

    Tuesday, May 3, 2011

    TechDays 2011: Some great Windows Azure tips

    Last week I attended TechDays Belgium. During two sessions about Windows Azure, Christian Weyer gave a lot of interesting tips.


    The first thing he mentioned was a tool called AzureWatch. This tool enables the automatic scaling functionality that is not available out-of-the box. It monitors your performance counters, instance statuses, queue information and other metrics and passes all this information to some rule engines that can take decisions based on this input. 

    Most important features are:

      • Automatically scale-up or scale-down your Azure instances based on...
        • Real-time demand using latest values of performance counters
        • Historical demand based on aggregated values of performance counters
        • Rate of increase of decrease in demand
        • Time of day
        • Sizes of Azure queues
        • Instance Ready/Unresponsive/etc statuses
        • Any or all of the above combined
      • Receive email alerts when user-defined conditions are met, such as...
        • When instances become unresponsive
        • When quantity of instances reaches maximum threshold but your system is still under heavy load
        • At predefined intervals with up-to-date performance metrics
      • Gain visibility into performance of your Azure applications with...
        • Powerful and comprehensive dashboard
        • Single Perfmon that displays performance metrics of your application averaged across all Azure instances
        • Analyze, print, or export performance metrics dating up to a month back
        • Drill-down reports and charts showing key performance indicators on a monthly, daily, or captured level
      • Safety mechanisms
        • Built-in limits prevent your instance count from going outside of a predefined range
        • Built-in throttle controls prevent your applications to not scale up or down too frequently

    Deployment in 3 seconds

    Another thing he showed us was a way to easily deploy Windows Azure applications without having to go through the entire deployment process of Windows Azure(which takes time).

    The idea is the following:

    • use Windows Azure Blog Storage to host the website/webservice package
    • use a 3rd party tool to map the blob storage account as a folder in Windows Explorer
    • Build the application, zip the output and copy the zip file to this folder
    • On your webrole add some code that checks for new files in this blob storage location. If new files are found extract the package and deploy it in IIS on the web role.

    This idea takes advantage of the fact that starting from SDK 1.3 the web app and the roleentrypoint code run in their own process(Christian called this the ‘web-workerrole’ functionality).

    If you are looking for a tool to mount your storage accounts locally in Windows Explorer,he recommends Gladinet Cloud Desktop.

    During his talk he gave a demo where he was able to deploy a website in a few seconds.

    For more information about this, check out Christian’s blog.

    Azure versioning

    At the moment there are 2 families of the Azure OS available:

    If you create a new instance, by default it’s configured to use version 1. Christian recommends to always upgrade this to version 2 and don’t specify a specific version(by doing this your system will be upgraded automatically).

    <ServiceConfiguration osVersion="*" osFamily="2" serviceName="CloudService1" xmlns="http://schemas.microsoft.com/ServiceHosting/2008/10/ServiceConfiguration">
    <Role name="WebRole1" >
    <Instances count="1" />
    <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" />
    <Setting name="DataConnectionString" value="UseDevelopmentStorage=true" />
    <Role name="WorkerRole1">
    <Instances count="1" />
    <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" />

    More information about this here.

    Thanks Christian for all these tips!

    Monday, May 2, 2011

    WCF: Certificate EncodedValue

    For a new application I’m building I have to use a certificate to connect to the WCF service. I didn’t want to pass the certificate through code instead I wanted to use the configuration model of WCF.

    I found the following 2 options to specify the certificate. Either you put the certificate in your local certificate store and pass the certificate by using a certificatereference:

    <certificateReference findValue="DE74CFE7D20E8DC2B6E6E700E4D2A940CB08B268" storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" />--><!--

    Another option is to embed the certificate into your application by specifying the base64 encoded value of the certificate:

    <certificate encodedValue="MIIGKjCCBRKgAwIBAgIKKwWMaS...TQymi87SNAM9H1dVaIfSysjc9BjhnhFm7HsINtj6S1g==" />

    But how do you get this encoded value?

    If you are using the svcutil.exe to generate the client proxy, this value will be added for you. Otherwise you can get this value yourself:

    • Open the Certificate store
    • Right click on the certificate you want to embed and choose Export…
    • Choose to NOT export the private key
    • Choose the Base-64 encoded X.509 option


    • Choose a file name

    Once the .CER file is exported, you can get the base64 encoded value by opening the .CER file in notepad and copying the string.