Yet Another Forum (YAF) for Windows Azure

Lately, while I was learning the basics of Windows Azure, I tried to deploy Yet Another Forum to the Azure platform.

It turned out that it's not that easy as the differences between SQL Server and SQL Azure can be quite painful despite the fact they theoretically aren't so big. Because SQL Azure requires every table to have CLUSTERED INDEX, I had to modify the YAF's database setup SQL scripts accordingly. Moreover, in the application code there were some places where I had to remove calls of the obsolete SQL stored procedures (those which are not supported in SQL Azure) and replace them with the non-obsolete ones. Also, there were some glitches with .config files, so I had to move some of the settings directly to the web.config.

However, I've eventually managed to prepare a working version of Yet Another Forum which is compatible with Windows Azure and SQL Azure. In this post, I'd like to publish the modified source code - I hope it'll be useful for someone out there :).

Here are the steps you need to take in order to prepare ready-to-deploy Azure package:

  1. Install Windows Azure SDK if you haven't done this yet.
  2. Download YAF source code (link below) and extract it somewhere on the hard drive.
  3. Open with Visual Studio 2010.
  4. In YAF project, open db.config and fill the database information (server address, database name, login credentials, etc.).
  5. In YAF project, open mail.config and fill the SMTP mail server information.
  6. In YAF project, open web.config. Review the settings and change them if necessary.
  7. Compile the solution.
  8. In Solution Explorer, right click the YAF.Azure project and choose Package... option to create Azure deployment package
  9. Go to the Windows Azure Management Portal and upload the package along with configuration file (both can be found in the app.publish directory

And finally, the most important thing:


YAF Download Link (GNU GPL v2 license):
Yet Another Forum v1.9.5.5 for Windows Azure


Great success at the Imagine Cup 2011 Worldwide Finals!

I took the 2nd Place worldwide in the IT Challenge competition at the Imagine Cup 2011 Worldwide Finals in New York, which took place on July 8-13!

I think this website is the last place in the whole Internet where this news appears, but my personal blog couldn't lack such information, of course :). It's a bummer that I was very busy in the last weeks and had to neglect this blog a little. However, it's a high time to make up for this. In this post, I would like to present some interesting resources concerning my participation in the IT Challenge 2011.

First, let's look at the small photo gallery:

The Competition Briefing

A group photo of Competitors and Judges

My "workshop" during the finals

Me on the stage

Also, watch some short video: Imagine Cup 2011 Awards Ceremony - IT Challenge

And finally, here are some cool links worth checking out!

Over 2.5-hour long Awards Ceremony recording:

Imagine Cup 2011 Winners List

My interview for WSS and CodeGuru portals:,1928

News on some popular Polish portals,1667126,1,4792042,artykul.html

Polish Ministry of Economic Affairs on Imagine Cup 2011

How to remove SVN metadata using PowerShell

Recently I decided to write a PowerShell script that will delete all directories named ".svn" from given directory and all subdirectories (which effectively removes all SVN metadata). On the Stack Overflow website I've found a command which will do what I need:

Get-ChildItem $path -Recurse -Force *.svn |
    Where {$_.PSIsContainer} | Remove-Item -Recurse -Force

And what turned out? The result of its execution is correct, but PowerShell displays ugly error messages by the way:

PowerShell: Remove-SvnMetadata

To get rid of these errors, I recommend using two subsequent commands:

$itemsToRemove = Get-ChildItem $path -Recurse -Force .svn |
    Where {$_.PSIsContainer}
$itemsToRemove | Remove-Item -Recurse -Force

Of course, these commands can be put into a script file which will take the directory path as a parameter. To do this, you should create a file named for example Remove-SvnMetadata.ps1 with the following content:

$itemsToRemove = Get-ChildItem $args[0] -Recurse -Force .svn |
    Where {$_.PSIsContainer}
$itemsToRemove | Remove-Item -Recurse -Force

To use the script, you should place it in a directory that is present in your PATH environment variable (I use C:\Users\BlaSOFT\scripts) or just in PowerShell console go to directory containing the script (then before the script name you should put .\). This is an example call which will remove all SVN metadata from D:\Temp\20110507 directory and all its subdirectories:

Remove-SvnMetadata.ps1 D:\Temp\20110507

I would like to say that I am also aware of the existance of Export function in SVN (svn export), but the solution I presented allows us to do the task even if we don't have any SVN client available in the system (or we don't want to use SVN for some reason).

How to "fix" Power Manager gadget after IE9 installation

In my previous post I wrote that after IE9 installation on my laptop, the transparency of Lenovo Thinkpad PowerManager gadget was broken down. Some time passed from that moment, meanwhile Lenovo released an PowerManager update, but the gadget still doesn't work properly. Because of that, I decided to fix the problem myself.

After some experimenting, I found the reason of broken transparency and figured out a way to bypass the problem. It turned out that the bug is not in the gadget, but in Internet Explorer. Installation of IE9 introduces the following bug. After every value assignment to, the PNG background transparency is toggled on/off. Knowing exactly where the bug is I prepared a small, step-by-step tutorial on how to fix the gadget on our own:

  1. Create some temporary working folder (in my case it was D:\Temp)
  2. Copy PWRMGR.JS file into the temp folder. The file can be found in the gadget folder (in my case it's C:\Program Files\Windows Sidebar\Gadgets\PowerManager.Gadget\EN-US)
  3. From download the scrdec18.exe tool and save it in the temp working folder
  4. Open Command Prompt in the temp folder. It can be done for example by holding Shift key, right clicking somewhere in the Windows Explorer window (but not on a file icon) and selecting the "Open command window here" option
  5. Decode the PWRMGR.JS, file by issuing the following command:
    scrdec18 pwrmgr.js pwrmgr_dec.js
  6. Open the decoded file - pwrmgr_dec.js - in some text editor (i.e. Notepad++)
  7. Find the resizeView() function
  8. Inside that function, replace every occurance of
    with =

    The replacing will be necessary in 3 places, totally. Then, we save the changes, of course.

  9. Delete file PWRMGR.JS from the temp directory. Next, rename pwrmgr_dec.js into PWRMGR.JS
  10. From our temp working directory, copy PWRMGR.JS file into the folder from whick we took its original version. (in my case it's C:\Program Files\Windows Sidebar\Gadgets\PowerManager.Gadget\EN-US). Allow overwriting the file.
  11. We're done! For the changes to be visible we now have to restart the sidebar.exe process. It can be done for example by logging out and logging in again. Instead of that I recomend to issue the following command in the Command Prompt:
    tskill sidebar && "%programfiles%\Windows Sidebar\sidebar.exe"

Of course, after performing all the above steps we are free to delete the temporary working directory.

Internet Explorer 9 - first look

Today, final version of the latest web browser from Microsoft has become available. Because I always prefer using up-to-date software versions (unless there are serious reasons against it), I installed IE9 in my laptop as soon as I could and decided to share my first impressions. Before I begin I need to say that for now, Opera is my browser for casual, everyday use. However, due to the fact that there are some websites that don't work properly with Opera, sometimes I have to use some other browser - in most cases it's Internet Explorer. Moreover, I almost always use IE to browse Microsoft websites (e.g. MSDN, TechNet) because I think that these pages are optimized for use in Internet Explorer. I just want to be certain that everything will be working as expected. So, after testing the IE 9 for a while my observations are the following:

  • program launches and closes faster, than IE8
  • tabs open way faster (in case of IE8 I had to wait 1-2 seconds for a new tab to open)
  • rendering speed improvement is very noticable (it's because of the new, optimized engine that leverages hardware acceleration) - for example, in case of I can see a huge difference
  • I like the new, reorganized user interface in which there is more space for webpage, whereas browser window controls take up less space
  • transparency in ThinkPad PowerManager Gadget stopped working :(

Here is the screenshot that shows how ThinkPad PowerManager gadget looks like after installing IE9:


I hope that lenovo releases some patch soon.

I have to say that Internet Explorer 9 is definitely worth downloading and installing, even if IE is not our default browser and we rarely used it. Internet Explorer is pretty heavily integrated with Windows OS and we often don't even realize that some third-party applications use IE engine as an "embedded browser"  (e.g. Vuze built-in serach). It's just better to have IE9 than IE8. It gives us greater user experience, improved security and many more cool features.  And now the question is: will Internet Explorer 9 become my "main" web browser? No. Not yet. There are still some issues that stop me from migrating, for example:

  • IE9 doesn't have automatic page refresh option (e.g. refresh every 30 seconds)
  • IE9 doesn't have Opera Link equivalent (yes, there is Live Mesh but it can't synchronize bookmarks with any browser in my Symbian phone)
  • IE9 doesn't have Opera Turbo equivalent

However, don't get me wrong. I truly think that Internet Explorer 9 is a huge step forward. I really recommend installing and using this product, but for now I'll stick to Opera.

How to use TFS 2010 without launching VS 2010

Visual Studio 2010 is a very demanding IDE, as far as hardware requirements are concerned. Due to that fact, its usability on low-end machines (e.g. netbooks) is seriously limited. However, sometimes we might need to use such kind of "weakly equipped" computer to work on some project which is developed with Visual Studio 2010 and Team Foundation Server 2010. In this post I will show you how to do the following activities without the need of launching the whole Visual Studio IDE:

  1. Download latest versions of project files from the TFS
  2. Edit one of the files using an editor with syntax highliting
  3. Upload modified file to the TFS

To do this, in fact we need to perform the following steps:

  1. Create a new workspace
  2. Get the latest versions of project files
  3. Check Out a file
  4. Modify a file
  5. Check In the modified file

We won't launch Visual Studio, but it has to be installed on our machine. Further description is based on the following configuration:

TFS address: http://tfs-server:8080/tfs
Project Collection name: DefaultCollection
Team Project name: TeamProject1
Source Control project directory: $/TeamProject1

So let's begin. We will use tf command-line utility, which was installed along with VS IDE.  First, we have to open Visual Studio Command Prompt, which can be found in Start Menu.

Then, we create a new folder and change current dir to that folder:

Now, we create a new TFS workspace and name it TeamProject1Workspace:

tf workspace /new ^
  /s:http://tfs-server:8080/tfs/DefaultCollection/ TeamProject1Workspace

It might be necessary to enter our TFS credentials:

Next, we can verify displayed settings and click OK:

Finally, we are able to get latest versions of TeamProject1 files which are stored in Source Control:

tf get TeamProject1 /recursive

After downloading, all files have "read only" attribute set, because they shouldn't be modified before they're checked out. Now we may enter the directory which contains file we want to edit:

We perform Check Out:

tf checkout Program.cs

Now we can open and modify this file, for example using the free and lightweight Notepad++ text editor:

After making some modifications, we save changes and close the editor. Now, we perform Check In:

tf checkin Program.cs

And that's it! We're done :)

If we would like to work on the same team project in future, we won't need to create new TFS workspace. We can just use tha one that was created before. However, before starting our work I recommend downloading latest versions of files with tf get some_path /recursive command.

On the other hand, if we're not going to work on this project (using the same computer) any more, we are free to delete the TFS workspace and remove the working directory along with it's content:

tf workspace /delete TeamProject1Workspace

A few words on IT Challenge

A few days ago I've written a post informing that it is finally possible to enroll IT Challenge 2011. For those, who have never heard or read about IT Challenge, I'll explain what it's all about.

IT Challenge is one of the categories of Microsoft Imagine Cup competition, which is one of the largest technology competitions for students, mainly from technical universities. IT Challenge's goal is to find the best students from the whole world, who have outstanding knowledge concerning Microsoft products and solutions that are created for IT. This year these products are:

  • Windows 2008 R2
  • Hyper-V
  • Exchange 2010
  • SharePoint 2010
  • Windows 7
  • System Center Operations Manager 2007 R2
  • System Center Configuration Manager 2007 R2
  • Forefront Threat Management Gateway 2010
  • Forefront Unified Access Gateway 2010
  • SQL Server 2008 R2
  • Office 2010
  • Office Communication Server 2007 R2
  • Windows Mobile
  • and others

The competition consists of 3 rounds.

In Round 1 the competitors need to pass at least 1 of 8 technology quizzes about products and technologies mentioned above. Each test has 30 multiple-choice questions. To pass, it is required to answer correctly to at least 15 questions. In fact this round is the qualification round. Passing the first round is "piece a cake", comparing to the rounds 2 and 3.

In Round 2 we need to create a design of a complete IT infrastructure which is based on certain assumptions and meets certain requirements. Each competitor has to prepare a Business Case containing detailed description of his solution and justify "why" this solution is the most modern, powerful and secure one and why it has the lowest TCO. All the requirements are specified in Case Study, which is published at the beginning of this round. The Business Case must have 5000 words or less.

Round 3 is the final round. There are usually 6 finalists whose Business Case got highest score. There is a rule stating that only one competitor per country can participate in The Finals. Because of that rule I wasn't the 2010 edition finalist. This round is a kind of "practical exam" - the finalists have to prove their abilities to deploy and configure software products mentioned above. The competitors use Remote Desktop and connect to servers prepared by competition Stuff in order to complete various tasks.

I hope that the above description is a helpful overview of IT Challenge category. More details you can find in Competition Rules or by asking questions at the IT Challenge Forums.

Registration for IT Challenge 2011 is now open!

Today came that day when I enrolled the "IT Challenge" competition of Imagine Cup 2011. Several hours ago, on the official competition site, the long awaited "COMPETE" button appeared, which should be visible to the logged in users who haven't enrolled this competition yet. I hope that in this edition I'll be more lucky than last time and I'll be a finalist at least. :)

What is TIC and how to use it?

Sorry, this post is available only in Polish.

4th place in Round 2, but I didn't get into finals

On 21st April, in the official Imagine Cup forums, Chris Amaris published IT Challenge 2010 Round 2 results:

It turned out that I took 4th place worldwide, but I didn't get into finals. It happenned because of the rule stating that only one competitor per country is allowed to advance to the Final Round. Unfortunately, this year I was unlucky and someone who is also from Poland took 2nd place. So, there were 3 competitors who became finalists just because there were no better competitors in their country. Rules are rules...

The fact is that participating in this year's IT Challenge expanded my horizons and knowledge about the IT and Microsoft enterprise products in a very significant way. I have to admit that I'm quite impressed after familiarizing myself with the latest software from Redmond. Its functionality, high level of security, reliability and ease of administration are features, which are often hard to find in the FOSS-based solutions.

Participating in the IT Challenge has given me even more. Now I know for sure that my knowledge and skills give me a real chance to be successful in future editions of Imagine Cup. I'll be a student for 3 more years so I will have at least 3 opportunities to stand on the IT Challegne podium. Through the next year I'm going to expand my knowledge on IT further and I'm fully convinced that the time spent on learning Microsoft technologies won't be wasted.