Moving SQL Databases to Another Drive

by Anton 11. December 2013 15:46

Since the space on my SSD was getting scarce, I decided to transfer the database files to a different drive. It was much easier than I expected:

  1. Detach the DB (via ‘Tasks’)
  2. Move the mdf and ldf files to the new location. (They are usually located somewhere under ‘C:\Program Files\Microsoft SQL Server\’.)
  3. Attach the DB by choosing the mdf file.

Thanks to the instructions from katieandemil. They were especially appropriate since I also had SQL Server 2008 R2 installed.

If you rather like to use Transact-SQL follow this stackoverflow post.


Administration | Database

Create Certificate for SSL Encrypted Site in IIS

by Anton 8. October 2013 18:32

I did not think it was that easy. I just followed these steps. Just create a certificate in Server Certificates feature on the server node in IIS. Then add https binding to your site (Port 443) and chose the certificate you just created.

Of course this self created certificate is only good for a website with users who trust you. For a bigger website you would usually get an authorized certificate from a trusted certificate authority.


Administration | IIS | SSL

Transfering Configuration from IIS 7 to IIS 8

by Anton 8. October 2013 18:25

Sometimes we need to configure a new server with the same websites / applications like on another server. Up until now we only used IIS 7.5 on our servers, and I always used these instructionsby Toni Pohl (in German). Sometimes I even then stumbled into problems – they had to do with different IIS installations (i.e. missing features) on the different machines.

Now, for the first time, we have a Windows Server 2012 with IIS 8. Since I could not find instructions on how to transfer the configuration from IIS 7 to IIS 8, I simply applied the same process like above.  It went badly: the Application Pools and Sites folder were gone. Luckily IIS backs up its configuration to %systemdrive%\inetpub\history. I restored the default by copying and overwriting adminstration.config and applicationHost.config.

I applied the same method to get the IIS 7 configuration into the IIS 8 on the other server: copy and overwrite adminstration.config and applicationHost.config. And it seems to work – I had no problems upto now.


Administration | Backups | IIS

How to add https bindings to a website in iis7

by Mark 20. September 2011 10:34

We wanted for one of our web sites a binding like but in iis7 manager I was not able to add a hostname for the https:


If this is completed it looks like this:


But I needed a real hostname. with some time searching the web I found a solution using the appcmd.

If I run a cmd with appcmd.exe or write a .cmd I was able to have my host binding with https.

appcmd.exe set site /”" /+bindings.[protocol='https',bindinginformation='*’]

I added a second line for

and that’s what Iv got:


Of course I had to remove the empty hostname. So only www. + docs. were reachable thru https

my .cmd looked like this :

C:\Windows\System32\inetsrv\appcmd.exe set site /"" /-bindings.[protocol='https',bindinginformation='*:443:'] /+bindings.[protocol='https',bindinginformation='*'] /+bindings.[protocol='https',bindinginformation='*']

So I removed the standard binding an added my wanted ones.


But be aware that at this point there is no ssl certificate selected for this hostnames.


Best, Mark



MSBuild does not build like Visual Studio 2010

by mark 7. September 2011 23:08

In most of our projects we use Continuous Integration (CIS) for test purposes and sometimes also for automated deployment to our web servers.

Recently, we had some problems with our new Todo Management project. During local development, we use Visual Studio 2010 for our projects to build. But our Team City continuous integration server (CIS) uses MSBuild to build our projects before we publish it.

After finishing the setup as usual for the Team City CIS, the automated deployment worked fine but the website threw the exception shown in this stack trace:

Server Error in '/' Application.

No constructors on type 'Teamaton.TodoCore.Repositories.TodoRepositoryJson' can be found with 'Public binding flags'.

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: Autofac.Core.DependencyResolutionException: No constructors on type 'Teamaton.TodoCore.Repositories.TodoRepositoryJson' can be found with 'Public binding flags'.

[Remark: TodoRepositoryJson is an old implementation of ITodoRepository that has been replaced by a different implementation,TodoRepositoryDb, by now. The old impl is still part of the project but only used explicitly where needed.]

After using Publish on a local machine with VS2010 and a quick copy-paste deployment to the web server the website was running fine. To verify the problem outside the CIS, I built the project on my local machine also with MSBuild and copy’n’pasted the DLLs to the server. The website now showed the same error.

The problem seems to be that VS2010 and MSBuild generate different DLLs from the same source code.

Hope to find the source for that problem soon…


Administration | Testing

Why and How We Still Support IE6 (and IE7) for Large Web Applications

by andrej 18. February 2011 11:14

Recently we at teamaton had a conversation with our client about what browser we were going to support for the campsite portal with a total of 2 million pageviews in the month of January.

Testing Funtionality and Layout According to Browser Pageview Shares

From our standpoint there are two major things you have to be tested browser-specific:

Testing Functionality

When testing functionality we  would try whether the user in any specific browser can access and perform all tasks and features that work in modern browsers (such as firefox, opera and chrome). This would include any kind of interactions with the site such as:

  • filling out forms
  • logging in
  • uploading pictures
  • interactions with galeries, pop-ups, tooltips, etc.

Testing Layout

Layout refers to way the look-and-feel of the page performs in the specific browser. This includes:

  • correct positioning of elements according to design (boxes, floats…)
  • correct display of icons, images, etc. (png, gif…)

Thus until recently we had a three different test-scenarios :

  1. Every browser above 5% pageviews gets the full treatment of complete functionality and layout testing
  2. Every browser between 3% and 5% would only get the functionality tested – the layout did not have to be perfect
  3. Below 3% we would test neither functionality nor layout

The New Analytics Statistics Change the Game

We took a closer look at the statistics google analytics provided. Pretty quickly we decided that maybe focussing only on the percentage of a browsers share is not the right approach. Here is why:

With Internet Explorer 6 (IE6) we had about 10.000 visits that generated about 100 hours of browsing. Which is a lot of traffic and for that matter relevant traffic. And according to our old rule, we would have stopped testing IE6 due its drop below 3% of browser share.

testing ie6 for web applications according to traffic - statistics

With Internet Explorer 7 (IE7) we had about 30.000 visits that account for about 300 hours of browsing. This accounts for about 8% of total traffic to And while looking at the decline of IE7 this would mean (according to our percentage rule) that we would stop testing layout for IE7 as soon as it would drop below the 5% treshold.

testing ie7 for web applications - statistics

Testing Functionality and Layout in Time Boxes According to Overall Invested Time

The idea was as simple as easy to implement: Rather than having an absolute percentage value of whether or not we would support a certain browser – we would allocating a certain percentage of our monthly time as a time box for supporting a specific browser.

For example: We spend about 200 hours working on implementing new features for Of those 200 hours we would invest 5% which equals 10h on supporting and testing IE6. Making sure functionality works first and than fixing possible layout bugs. If there are still bugs we would try to fix them in the next month or iteration.

The important lesson learned is that you focus your development and design on the majority of users (which do use modern browsers) and make sure that they get a bug-free web application deployed. For the rest – you set yourself constraints – so as not to spend too much time on what is not central for your business.

How do you decide on what browsers to support and how much time to invest in supporting them? Feel free to post in the comments…

[If you are interested in how we actually test IE6 and IE7 – there is a post over here on our test setup]

Tags: , , , , , ,

Administration | Testing

Switching from HDD to SSD with Clonezilla without reinstalling Win7

by andrej 13. February 2011 22:10

Solid State Disks (ssd) are all the rage these days. They are fast, use up less energy, are quiter and have become quite affordable. If you don’t want to go through the hassle of reinstalling your operating system (in my case Windows 7) follow this straightforward guide to cloning your current hard drive with the OS and data on it to your new ssd.

Step 1: Buy ssd and External Case

Depending on the kind of cash you are willing to spent there are a variaty of solid state disks, offering different sizes and speeds. The best ssd for you depends on your needs. There are some with faster reading rates, some with faster writing rates and so forth. There are a lot of guides and tipps to help you make your decision.

We have decided to go with this 120GB Vertex 2E 2,5” ssd by OCZ bought for about 250$.

switching from hd to ssd: ocz vertex 2e 2,5" solid state disk

I recommend you to buy an external usb case for your current hard drive, so that you can clone the disk on the fly and later use your “old” hard drive as an external drive. For backups or other data for example. You can get an external 2,5” for about 10 bucks.

Step 2: For Safety – Make a Backup of Important data

Before proceding with anything else, you should consider backing up all your important data. If you don’t already do it anyway. We use a small Windows tool which is quite compact and easy to use: SyncToy.

clone win7 from hd to ssd: syntoy screenshot

Step 3: Shrink Current Hard Drive to Smaller Size Than New SSD

In order to be able to clone your current hard drive to your new ssd you have to make sure, that the ssd size is at least the same size as your current disc. Otherwise you won’t be able to clone it.

First make sure that you have enough free space on your partition available.

You can try to shrink your current partitions to an acceptable size. You would do this with the “disk management" console provided by windows. This however did not work for me, because my current partition with about 200GB space was too fragmented. It may however work for you.

The alternative is to use a small open source tool: gparted (gnome partition editor).

  1. After downloading burn it to cd/dvd
  2. Restart your pc and boot from the cd/dvd
  3. Run through live boot menu (nothing fancy)
  4. As soon as you are in the tool, select the partition you want to shrink
  5. Choose resize and select the size suitable for your new ssd (I recommend to have some space still available for the hidden windows partition and possibly a vendors partition which have to be cloned as well)
  6. Hit the “apply” button on top and gparted does the rest

shrinking hard drive to clone your hd to ssd: gparted screen shot

Now you should have a shrinked partition which combined with other partitions on the hard drive is smaller than the size of your ssd.

Step 4: Format the New SSD

I am not sure, whether it is necessary: Format your new ssd. It might be, that clonezilla has trouble recognizing it if it is not formated.

Step 5: Download and Burn Clonezilla

Now we come to the cerntral part of cloning your current os to be used on your new ssd without reinstalling the operating system.

Our tool of choice is an open source cloning tool: Clonezilla.

Download clonezilla and burn it to cd/dvd.

Step 6 (Optional): Make a Performance Test

Just so that you can have a precise measurement of what your performance gain is with your new ssd, run a test on your old hard drive. You can use the free tool HDTune which gives you solid results.

switch hard drive - clone hd to ssd: screenshot hdtune performance test 

Step 7: Mount your SSD and HDD to External Case

(Don’t forget to turn off your pc while removing hardware.)

In order for your to directly clone from your old hdd drive to your new ssd drive I recommend you to remove your hdd and install the ssd. This makes the whole cloning process faster due to the better writing speeds of your ssd when installed in your pc/notebook.

Also mount your hdd into the external case and connect it via usb.

Step 8: Cloning Your HDD to Your SSD

clonezilla screenshot: cloning your hdd to a fast ssd

  1. Start your pc and boot clonezilla from the cd/dvd you burned in step 5
  2. Choose the first option “clonezilla live” in the startup screen
  3. Choose “English”
  4. Choose “Don’t touch keymap”
  5. Choose “Start_Clonezilla”
  6. Now choose the second option: “device-to-device
  7. Choose “Beginner Mode”
  8. Now choose “Disk to local disk” (this makes sure to clone your complete disk)
  9. Set your source drive: Your old hdd
  10. Set your target drive: Your new ssd
  11. Hit “y” (yes) when asked by clonezilla
  12. Watch your drive being cloned. This can take some time – depending on the size and speed of your hard drives. In my set up with about 100GB it took 45 minutes.

Notice: It is important to choose “disk-to-disk” clone and not partition-to-partition due to some specifics with Windows 7. There is a “hidden” partition that even when you seperately clone is not being recognized by Windows which brakes the OS.

Step 9: Restart and Be Happy with Blazing Speed :)

This is it. If everything went smoothely your Win7 should be up and running without any problems. A restart after the first start might be necessary.

After rechecking my performance with HDTune this was the result:

hdtune benchmark with new ssd after cloning win7 from hdd to ssd

Average speed went up 4 times: from 35 to 146Mb/sec

Access time went down from 15ms to 0.3ms.

Looking forward to my first build in visual studio and working with 1GB files in photoshop :)

Bottom Line: Little Effort – Lot of Time Saved

If everything went according to plan you should be done with switching from your old and slow hdd to your new and fast ssd within 2 to 3 hours for the whole process. Which is definitely a lot shorter than installing your operating system and programms from scratch. Not to mention setting up your work environment.

All tools we used were free and easy to use.

If you have any questions or suggestion feel free to post in the comments.

And enjoy your new ssd :)

Tags: , , , ,

Administration | OS | Backups | Performance | guide

About the author

The authors are the admins at teamaton.

Isn't everyone a little admin?

Month List

Page List