October 2009 Blog Posts
Visual Studio 2010 Beta 2 available now

After a surprise comment to a three year old posting I realized that I have gotten sloppy, since I used to post about Visual Studio beta and service pack releases. Since Visual Studio 2010 Beta 2 just came out I thought it would be a good opportunity to pick up that old tradition again.

Visual Studio 2010 Ultimate Beta 2 Splash Screen

Visual Studio has become much more than the development environment it used to be when Microsoft released the first version of Visual Studio .NET in 2002. After losing the .NET moniker with the release of Visual Studio 2005 the number of different editions dramatically increased, the flagship model now being called Visual Studio 2005 Team System Team Suite, and it gained a real source control system in the form of Visual Studio Team Foundation Server. The different product editions lived on in Visual Studio 2008, which still came with a plethora of editions lead by the flagship Visual Studio Team System 2008 Team Suite edition (depending on where you look Microsoft apparently couldn’t make up their mind on where to put the year in the product name).

For 2010, Microsoft decided to shed some weight and reduced the number of editions to three (four if you count Express), and it is also losing the Team System moniker, which shortens the name simply to

So I said above that Visual Studio has become much more than just the development IDE, so what else is there? Well, how about this:

Most of these products are available in x64 and x86 flavors, depending on what OS version you are running, and all of them are supported up to and including Windows 7 of course. Curiously the F# Runtime download is only available on MSDN, but don’t worry, it is of course included in all Visual Studio 2010 editions already (with the exception of Express I believe).

One of the most notable new features in Beta 2 has to do with Team Foundation Server, it now ships with a Basic configuration option that allows installation on client operating systems. The installation has also been extremely streamlined, so no longer do you have to wade through pages of pre-requisites and set up a whole fleet of virtual machines, you can simply drop it onto your Windows 7 client box and try it out! Brian Harry describes it all in detail here.

If you are interested in any of the other feature enhancements of Beta 2 or Visual Studio 2010 in general check out the detailed descriptions on Soma’s Blog, Brian Harry’s Blog, Paul’s Blog and Scott's Blog, and did I already mention Beta 2 comes with a Go Live license?

The final release for Visual Studio 2010 and all related components is expected to take place on March 22, 2010. I’ll post more details as they become available!

posted @ Wednesday, October 21, 2009 3:05 PM | Feedback (14)
How to (not) restore SQL-driven ASP.NET websites

After having really nothing important to report on for quite a while I wanted to share some experiences and gotchas I ran into while restoring this blog.

Basically what had happened was that my server (and the rest of the stuff from my old house) was moved to a new location, and at the same time I decided to perform a hardware refresh (I really wouldn’t call it upgrade since I replaced the existing processor with a low power Celeron and an energy saving power supply) and topped it off by switching from the old Windows Vista 32bit system to a fresh Windows 7 64bit install. Since I was also using a new hard drive for the OS install, I still had all the old data, but I didn’t bother taking any database backups or saving any files before I wiped the machine out.

On the software side the following things changed:

  • I went from Windows Vista 32bit to Windows 7 64bit
  • That also meant going from IIS 7 to IIS 7.5 which comes with Windows 7
  • Instead of SQL Server 2005 32bit I installed SQL Server 2008 SP1 64bit

And these are the things I had to do to get my blog and other ASP.NET web applications running again:

  1. After installing Windows 7, I added IIS7.5 to it and then installed SQL Server 2008 SP1 64bit. So far so good!
  2. Next I copied over all the ASP.NET web applications from the old harddrive wwwroot folder into the Windows 7 wwwroot folder. You might want to make sure you give the files the right permissions and take over ownership as needed, otherwise the user accessing the web application might have issues reading the files.
  3. Getting my old SQL Server 2005 databases into SQL 2008 was much easier than I thought, especially since I didn’t take any backups but only had the original MDF files from the old Data folder. I copied all the files from the old folder (depending on the name of your SQL instance the folder path should be something like this: Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data) into the same path on the SQL 2008 installation. Then I fired up SQL Server Management Studio and used the Attach menu option (see screenshot below) to load the MDF files and import everything into SQL 2008. It even took care of automatically upgrading the databases from SQL 2005 to SQL 2008!

Microsoft SQL Server 2008 Attach Database

Now for the complicated part: Since Windows 7 comes with IIS 7.5 there were some changes Microsoft had made that I was not aware of. They have since been widely published and talked about in other blogs such as here and here. The main change that affected me is the fact that the default Application Pool Identity in IIS 7.5 changed from NetworkService to AppPoolIdentity. That meant my database connections were not working anymore, because the authenticating user was not a member of the database users. To get it working again I had to do the following:

  • First I removed the old NetworkService account from the database users, since I did not want to have old entries lingering around. The account name is NT AUTHORITY\NETWORK SERVICE.
  • Then I had to do some reading to find out what the actual username of the AppPoolIdentity is. Finally I figured it out: It is IIS AppPool\<app pool name>.
  • After adding the app pool users to their respective databases, everything immediately started working again!

In the end I learned a couple of neat new things about IIS 7.5 and how to restore web applications with databases without much preparation :-)

posted @ Wednesday, October 21, 2009 2:53 PM | Feedback (11)
iPhone 2.1 Development in Windows using Eclipse

A couple of days ago PJ Cabrera published a document through IBM DeveloperWorks on how to use Eclipse CDT to develop iPhone applications under Windows or Linux. The instructions included jailbreaking the iPhone and installing software through Cydia to be able to transfer applications over to the phone. It also required the user to decrypt parts of the iPhone firmware to compile the toolchain. Apparently it did not take long for IBM to realize what they had allow to be published, so at the time of this posting the link to the document as well as the PDF have been removed by them.

However, those who were able to get a copy of the document before it was pulled might have noticed that the instructions did not work as printed under Windows. It took me a while to figure out what needed to be changed, especially since the document was written for the original 2.0 firmware, so I thought it might help somebody else to get some hints on how to get it working with the current 2.1 firmware. The following updates to the instructions only apply to Windows, I have not tested the instructions under Linux yet:


  • When installing CygWin, for autoconf pick autoconf2.1. For gcc, pick gcc-core and gcc-g++, which will automatically select gcc-mingw-core and gcc-mingw-g++.
  • In addition to the CygWin packages listed in the instructions, you will also need to select openssl-devel from the Devel category, otherwise you won't be able to compile vfdecrypt.

iPhone Firmware

  • Download the iPhone firmware that matches the firmware currently installed on your iPhone. The instructions assume that you have 2.0, but since then newer versions have come out. Currently 2.1 is the latest version, and the firmware to download in that case is called iPhone1,1_2.1_5F136_Restore.ipsw.
  • That also applies to the version of the operating system image, which for the 2.1 firmware is called 018-3946-43.dmg.


  • The instructions for vfdecrypt are incorrect. The command line parameters in Windows have to be like this (using the operating system image for the 2.1 firmware):

   vfdecrpyt 018-3946-43.dmg decrypted.dmg

  • This also means that you cannot actually pass in the decryption key into vfdecrpyt, it has to be compiled into the executable. To make vfdecrpyt work you have to edit vfdecrypt.c in the iphone-2.0-toolchain\src directory and find the line in the code that says

   --------INSERT KEY HERE--------------

  • Undernath you will find two lines

   convert_hex("--------------------------------", aes_key, 16);

  • and

   convert_hex("---------------------------------------", hmacsha1_key, 20);

  • The first 16 bytes of the key go into the first line, the remaining 20 bytes of the key go into the second line. Replace the dashes with the key parts and then compile vfdecrpypt.
  • You need to use the key that matches your iPhone firmware. The key printed in the instructions only works for firmware 2.0. Because of the possible legal implications I am not going to publish the key for firmware 2.1 or link directly to a website that publishes it, but it should be okay to point out that keys for all firmwares (including the latest beta firmwares) can be found on the iPhone Wiki website.

That's as far as I got in the instructions so far. I will update this post as necessary to get all the way through it!

posted @ Wednesday, October 21, 2009 9:03 AM | Feedback (10)
Welcome! This is the blog of a .NET software development enthusiast living in Silicon Valey, California, USA. The opinions posted here are my own and in no way represent the opinions of my employer or anybody else.