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…

Tags:

Administration | Testing

Login to SQL Express failed

by Mark 26. April 2011 10:13

Every few days our servers try to block our daily workflow with tricky errors or strange behavior.

Here a example from the evil SQL-Server express:

On of my colleagues run into this problem last week. He could not login into the Microsoft SQL Management Studio and the error message was:

2011-04-26_095552

He was logged in at one of our Servers with admin rights but the login didn’t work.

He logged in like

2011-04-26_095712

Then he asked me for a hint to this problem and I wondered why not simply put the servername instead the ip. if you logging in from a external source you have to use the ip if the service is running and the right ports are open.

So he tried

2011-04-26_095645

And voila, he got logged in… the day was saved.

But the battle between admin-good and server-evil will go on…

Best

Mark

Tags:

Restore Backup on TeamCity CIS

by Mark 10. March 2011 12:46

We are running a Team City Continuous Integration Server (CIS) Version 6.x for our integration tests and yesterday i had some trouble restoring a Backup i had created some minutes before. I have tried a few times but the error message  was

2011-03-10_123335

Looking at the Jetbrains documentation for the TeamCity 6.x was no help.

After some Try&Error on a Virtual Machine i deleted all buildserver.* files in the ‘C:\Users\Administrator\.BuildServer\system’ path.

And finally i got the Database restored!

(The picture above was shot after the migration of the database from internal to MS SQL 2008 express. So the target DB is not the same)

Mark

Tags:

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 camping.info 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 camping.info. 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 camping.info. 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

Testing all IE Browser (IE6, IE7 and IE8) with Virtual PC

by andrej 31. January 2011 15:07

When working on large web applications (e.g. currently the campsite portal camping.info) you cannot ignore users that are visiting your site in not modern browser such as IE6 and IE7 8 (we explain why in the blog post on IE6 and IE7 stats).

You Need to Test IE6 and IE7 – But How?

testing ie6 on windows 7 virtual pc - ie6 logo testing ie7 on virtual machine with virtual pc - ie7 logo

Previously we have been testing with desktop tools provided by xenocode. However they have stopped supporting the service, so we had to switch to a different solution.

An extensive post on stackoverflow.com had a wide selection of choices:

Our choice was to go with a native environment and “real” browser:

Testing IE6 and IE7 with Virtual PC

There is a great instructive blog post by Donavon West on how to set up IE6, IE7 and IE8 on Windows 7 with Virtual PC XP Mode.

Dislcaimer: This will only work, if you have Windows 7 Ultimate installed.

After following Donanons instructions, you should have easily accessible versions of IE6, IE7 and IE8 ready to test your web apps or web sites.

Testing a Local Web Application with Hamachi

However, if you are running your web applications via your local iis, you still have to complete a couple of steps to be able to access your local sites via your newly set-up virtual machines.

You have to get sure you are not browsing the real site outside your development enviroment. So all connections via http have to redirect to your local iis. This is done in the host file.

 

on the Host:

  1. Make sure you have hamachi installed on the host machine (hamachi is a shareware virtual private network (VPN) application)
  2. find the hamachi-ip on the host system:
    1. open a cmd and run ‘ipconfig /all’
    2. look for the IPv4 of your lan or wlan card (depends on how you got connected)
    3. our network is running with dynamic IPs. So this IP is surely gone next time. Thats were the Hamachi-IP comes to work. This IP is always the same. Just make sure hamachi is running if you need the testsetup.
    4. write down the hamachi IP from the cmd.
  3. write this hamachi IP address with the necessary bindings in the hosts file ((C:\Windows\System32\drivers\etc) ) of the Virtual PC. Add all subdomains that have to be tested (www.exampl.com, en.exampl.com, fr.exampl.com... ).

on the virtual PC:

    1. go to the hosts file in the Virtual PC (C:\Windows\System32\drivers\etc)
    2. add hamachi-IP and all the bindings for the testsite to the hosts
    3. if you are missing one subdomain you will browse the real site and not your development environment.

Now you should be able run the testsite with IE6 in the Virtual PC. If its not working check whether or not the hamachi virtual networkcard is running.

 

 

Happy Testing :)

Tags:

Testing

Frontendtesting with WatiN? not working for me…

by mark 26. January 2011 22:22

For one of our internal projects I was looking for another tool beside selenium for automated frontend testing in .NET.

And after some research around the web I decided to give WatiN a try and installed the TestRecorder on one of our virtual machines. a windows server 2008.

On the Video on http://watintestrecord.sourceforge.net/ it looked very simple to use but after the instalation of the TestRecorder it stuck at the start with this error message:

error_watin_recorder

After a click on the continue-button the WatiN TestRecorder started anyway but I was not able to run it like shown in the video. There were some buttons missing. I wasnt able to run it in any form.

error_watin_recorder2

I spend some time searching the documentation and the internet but wasnt able to fix the installation. So i decided to stop it and will test again with selenium. Mabye WatiN will get a second chance sometime but for now it is selenium…

Best, Mark

Tags:

Testing

Welcome to Happy Sharks – A Blog About Web Applications from an Admin Perspective

by andrej 26. January 2011 14:13

This blog is currently powered by teamaton – a small web application company based in Berlin, Germany.

We will share our insights on administrating and testing small to large web applications.

Primarily we are going to be writing about some of the following and much more:

  • system administration
  • web application testing
  • server maintanence
  • database related posts

Our current technology stack revolves around the asp.net framework. Which means we all work with Microsoft technology and products (servers, development tools, etc.).

Hope to see you around and giving feedback,

Mark

Tags:

Blog

About the author

The authors are the admins at teamaton.

Isn't everyone a little admin?

Month List

Page List