Recently Microsoft announced WCF RIA Services. Basically it is next version of RIA Services issued after last July CTP one, but under the new official name.

Before upgrading to the new version, everyone currently using RIA Services July CTP version should think twice and plan this activity, because the process is quite time consuming. RIA Services PDC 2009 Breaking Changes document (17 pages) could help you in estimating the task.

When I finished with breaking changes, I got another issue related to running WCF services under IIS7 on Vista. Particularly, I got an exception that reported unavailability of my domain services: "Load operation failed for query 'GetMyEntities'. The remote server returned an error: NotFound". When I tried to access the service using its URI (http://[MySite]/Services/MyApp-Web-Services-MyDomainService.svc), I found the error confusing for me:

IIS specified authentication schemes 'IntegratedWindowsAuthentication, Anonymous', but the binding only supports specification of exactly one authentication scheme. Valid authentication schemes are Digest, Negotiate, NTLM, Basic, or Anonymous. Change the IIS settings so that only a single authentication scheme is used.

According to people, the error could be easily solved by disabling the Integrated Windows Authentication schema under IIS, but I could not find where I can configure the Integrated Windows Authentication schema in IIS7 management console.

As it turned out I had to re-configure my IIS7 in order to see the Integrated Windows Authentication setting. This article describes how to do it.

Now I can start enjoying WCF RIA Services.

This week I encountered a nontrivial issue while installing SQL Server 2008 on Windows Vista Czech version with the user interface switched to English. At the beginning of the installation I got the error:

Rule "Performance counter registry hive consistency" failed

Rule Name: PerfMonCounterNotCorruptedCheck
Rule Description: Checks if existing performance counter registry hive is consistent.
Message: The performance counter registry hive is corrupted. To continue, you must repair the performance counter registry hive. For more information, see

It took me long time to recognize and solve the issue. First of all, I started googling for a solution and got an impression that I am not alone. Some of proposed solutions were quite promising (like this one), but no one helped in my case. And then, being about to give up, I came along a bug description that finally explained to me what is going wrong.

In order to check the performance counter registry hive consistency, the installer compares four values from next registry keys:

  1. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Counter" with the last value from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{LCID}\Counter"
  2. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\Last Help" with the last value from "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\{LCID}\Help"

where {LCID} is the system locale. For English version, it is "009", and for Czech one — "005".

As I have the Czech version of Windows Vista, but with English interface, the registry node "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\005" (corresponding to the Czech locale) was empty. I think it is a system issue, but not SQL Server's one.

In order to fix the issue, I had to manually copy the Counter and Help nodes from "...\Perflib\009" under "...\Perflib\005", and syncronize the "Last Counter" and "Last Help" keys with just copied ones. You can read more on this topic in this article.

If your original version of Windows is not Czech, you can use the Process Monitor to identify a registry key the installer tries to open.

Please, don't forget to make a copy of the system registry before you start to make any changes there. Just in case ;)

Today I regret that I have Vista on my laptop that I use for one pet project. Because of the User Account Control (UAC), I cannot run some automated build tasks. Namely tasks to manage virtual directories under IIS7.

When I try to execute the CreateVirtualDirectory and DeleteVirtualDirectory tasks from SDC Tasks Library, I get an "Access is denied" error. It happens, because such operations require the administrative privileges, but by default the UAC forces users (even from the administrators group) to run like they were regular users without such privileges.

There is only one way to run automated builds that touch system components — disable UAC. It is possible to do either through the user interface or from the command line.

You should be warned disabling UAC you reduce the security level of the system and also it will require reboot to apply the changes. Though there are some alternatives, but they require manual steps.

  1. Right clicking on a build script file, select the "Run as administrator" command.
    Drawback: the script will be started in the System32 directory and you will have to either specify full paths to other files or specify them in the PATH environment variable.
    (Update: there is a way to keep the current directory of a batch-file being run as administrator).
  2. Instead of running a build script as administrator, run a command prompt with evaluated privileges, change the location to one with your build scripts and start them from there.
  3. Run build scripts as a user from the administrators group using the Runas command.
    Drawback: UAC will prompt you for administrative privileges and you will also have to provide a password. Runas does not accept empty passwords.

For now I decided to go with the second solution and do some build's steps manually.