Galin Iliev's blog

Software Architecture & Development

Ready! Steady! Go!Go!Go! (grab VS2010 beta 1)

and learn WF4/WCF4 :)

VS 2010 Beta 1 has been put for download for MSDN subscribers and it is matter of hours to become available for public download (I will update the post once I have the link).
UPDATE: VS 2010 and .NET 4 Beta 1 is available for download.

Of course there are new things but looks like the focus is not on learning new ways to do old things but really make things easier. Takes a look at this nice story in pictures Developer Division GM Jason Zander posted.

The MSDN Code Gallery site has updated WF 4/ WCF 4 Training kit for all interested in bleeding edge features:


Introduction to Workflow 4

In this lab you will get to know the basics of creating, hosting and running a workflow. This lab is also intended to be an introduction to the new workflow authoring constructs in the .NET Framework 4 and Visual Studio 2010, including the new Workflow Designer, expressions, variables and arguments. Additionally, you will explore the use of some basic built-in activities.


Introduction to Workflow Services using .NET Framework 4

This hands-on lab is intended to introduce developers to writing workflow services using .NET Framework 4. You will examine the different messaging activities of Windows Workflow, and learn how to configure them to create a distributed application. This lab is built around a specific HR business scenario where candidates submit their applications and are hired or rejected based on an evaluation process.


Workflow Designer Programming Model

This hands-on lab introduces you to the designer programming model of Windows Workflow 4. You will learn how to rehost the workflow designer in a WPF desktop application and how to create composite custom designers for your workflow activities.


Creating Flowchart Workflows

This lab is intended to be an introduction to the Flowchart paradigm used in Workflow development. In this lab you will learn how to create Flowchart Workflows using the designer, and you will also learn the usage of several of the provided activities and how to create custom activities easily.


Monitoring Workflow Services using .NET Framework 4

During the life cycle of an application, developers and system administrators often need to monitor running services in order to perform health checks or troubleshoot issues. The Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) runtimes already come with a built-in tracking infrastructure, making it easy to enable monitoring within your WCF and WF applications. In this hands-on lab you will learn how you can leverage some of the main WF and WCF monitoring features to track application execution and troubleshoot problems with services when necessary.


WCF Service Discovery using .NET Framework 4

Windows Communication Foundation 4 includes a new feature that enables service discovery. Service discovery allows you to locate services on the same subnet using ad hoc discovery, or using a proxy to establish connections with servers regardless of where they are. In this lab you will create a simple chat application that will use both methods to learn about available services.

Boot from Virtual Hard Drive (VHD)

What a great improvement :). Now I can freely explore different messy things without having to wait whole night to reboot the virtual machine :)

In Windows® 7, a virtual hard disk can be used as the running operating system on designated hardware without any other parent operating system, virtual machine, or hypervisor. Windows 7 disk-management tools, the DiskPart tool and the Disk Management Microsoft® Management Console (Diskmgmt.msc), can be used to create a VHD file. A Windows 7 image (.wim) file can be deployed to the VHD and the .vhd file can be copied to multiple systems. The Windows 7 boot manager can be configured to boot directly into the VHD.

The .vhd file can also be connected to a virtual machine for use with the Hyper-V Role in Windows Server® 2008 R2.

Here are some interesting articles that could help you to do the trick:

You need to prepare the Virtual OS for the change in hardware from a virtual to a physical environment using the following Sysprep command:
c:\windows\system32\sysprep\sysprep.exe /generalize /oobe /shutdown

Was this information helpful?

Outlook Recently I got the error message and with a smile remembered the funny video showing how developers in Microsoft really shares the users’ pain.

I knew what to do (after saving draft message):
Plan A: Restart outlook and try again.
Plan B: Use Outlook Web Access

But will typical user know what to do without lose data?!

Then I remembered how good error messages are built: they should contain three parts. No less because it cannot provide full information. No more because user is overwhelmed. Exactly three:

  1. Describe what happened – first part briefly describes what went wrong.
  2. Give directions what to fix – user might really know what to fix. It could be just overlooked. Tell them what to change to fix the problem. Even program/PC restart is a solution.
  3. What next?! What if the problem still persist?! – If we are here then the problem is serious. And the user have tried basic scenarios to fix and can call someone for help without feeling stupid/guilty that don’t know how to fix the problem.

On other hand this is extremely useful message:


P.S. Plan A did the job :)

MS Operations Manager on Windows Server 2008

logo-header-sc-operationsmanager-dg Today I’ve installed System Center Operations Manager 2007 and run into an issue with WebConsole. When started it gave me error 402. Access Denied – the yellow screen of death for ASP.NET applications. Luckily it was very easy to fix – with a single option change in IIS Manager:

Just Windows Authentication should be enabled.



image Note: In order to install Operations Manager 2007 WebConsole and pass prerequisites check IIS 6 Management compatibility should be installed:

Hope this helps

Code coverage on (external) WCF Service

This is not very wide known feature in Visual Studio that has been there even in version 2005 but still there are not many articles on it.

When you try to get code coverage from functional tests then the default UI features in VS won’t help. This is because code coverage is measured only on referenced assemblies (from what I was able to understand). The steps below actually describe the process of collecting code coverage data.

In order collect code coverage information on service – could be remotely hosted WCF service, or local WCF service but hit through endpoint – following steps should be executed:

1. Instrument the assemblies – did you think that code coverage is that simple :). VsInstr.exe is the tool for that.

   1: VsInstr.exe /coverage wcfService.dll

2. Deploy assemblies – This step means actually installing deployed instrumented assemblies on the IIS. On other side default WcfSvcHost.exe also can be used:

 WcfSvcHost.exe" /service:%cd%\WcfService.dll /config:%cd%\WcfService.dll.config

3. Start VS monitor that collects data  -this is separate tool - VSPerfCmd.exe.  Sample usage is

VSPerfCmd.exe /start:coverage /output:”C:\CoverageData.coverage” /cs

4. Run your tests that hit the service.

5. Stop the monitor.

 VSPerfCmd.exe /shutdown

6. Open c:\CodeCoverageData.coverage in VS

Hope this helps…

Ops. Almost forgot. I wasn’t able to make it work on x64 bit machine. For this purpose I had to use x86 version of .. Windows, of course :) !

Here are some useful links:

Office 2010 – office in the web

“Office 2010” will be official name of Office 14 and will be ready in “the first half of next year”.

Office 2010 — previously known by the code name "Office 14" — will include slimmed-down versions of Word, Excel, PowerPoint and OneNote that let people create and edit documents in a Web browser. Consumers will have access to a free, ad-supported version, and Capossela said the company is still hammering out what to charge businesses that want a version without ads.

source MSNBC

What’s changed in Windows Server 2008 R2

TechNet has a list of changes that will be released in Windows Server 2008 R2:

  • What's New in Active Directory Certificate Services
  • What's New in Active Directory Domain Services
  • What's New in AppLocker
  • What's New in Biometrics
  • What's New in DNS
  • What's New in Failover Clusters
  • What's New in Group Policy
  • What's New in Hyper-V
  • What's New in Network Access Protection
  • What's New in Network Policy Server (NPS)
  • What's New in Networking
  • What's New in Remote Desktop Services
  • What's New in Server Manager
  • What's New in Service Accounts
  • What's New in Smart Cards
  • What's New in User Account Control
  • What's New in the Web Server (IIS) Role
  • What's New in Windows PowerShell
  • What's New in Windows PowerShell Cmdlets for Roles and Features
  • What's New in Windows Search, Browse, and Organization
  • What's New in Windows Security Auditing
  • WCF vs. UFC

    There are too many acronyms in today’s worlds so let me help you understand these two:

    • WCF –Windows Communication Foundation
    • UFC - Ultimate Fighting Championship

    You might started to think how these two are related?!

    Well they are not :). But I find some analogy between the martial arts events and the new initiative to popularize .NET platform for enterprise programming – WCF called WCF Champ Web Campaign.

    (photo courtesy
    Flickr). This is the pretty face of UFC.

    Developing web services old-fashioned way could be as cruel. Evidence can be seen on official website of WCF Champ Web Campaign as well as on YouTube in Hi Definition format.

    WCF Champ Web Campaign website offers great links to resources for jumpstart with this great framework. The resources are grouped in several categories describing why WCF can be of great use for:

    • Individual Developer
    • Enterprise  
    • Web
    • and what the future look

    Take a look at WCF Champ Web Campaign website. It’s fun and useful.

    Note: The analogy between WCF and UFC is done only for fun and shouldn’t be considered in any other way.