Saturday, April 25, 2009

Quick, Easy and Free WAN emulation with WANem

Fibre Channel cable By Herrolm @ Flickr

A client recently asked us to deploy a MOSS based intranet over multiple geographical sites. The gist of it is to have a SharePoint farm in France and a second one in the US, with this dual-farms setup being as transparent as possible to the user. This in itself represents quite a challenge and as such will be the subject of a post once the project is finished.

We, of course, tried our different options in a mock up environment consisting of several virtual machines hosted on a single VMVare server instance.

As such, this set-up obviously lacked in representativeness of the actual environment. Being geographically dispersed the servers are not able to communicate in real life as efficiently as they can in the mock-up environment. They are indeed connected over WAN with round trip latencies over 100 milliseconds. We fiddled a bit with VMWare server options trying to find an option to limit the virtual network speeds, without any success. It would seems like VMWare ESX is better suited for this kind of WAN emulation but ESX wasn’t an option, especially considering that we had no certitude about its features regarding WAN emulation.

But wait, there is a free, open-source, easy –to-install, easy-to-use option available. Let me introduce you to WANem (for Wide Area Network Emulator). It’s a Linux live-cd (The numerous 2.09 % of linux visitors over the past month on this blog might be interested to know that it is based on Knoppix) bundled with the WANEm software itself that Tata Consulting provides us with at

As it is a live-cd, there is absolutely no installation to be done. Just boot up, select DHCP or enter the network information and you are good to go. You can then select from a direct-to-the-point interface what bandwith limitations and latencies you want to enforce. An advanced mode will even allow you to specify numerous others parameters such as the packet loss ratio. The only other piece of configuration you’ll need to do is to specify routes on your servers so that the packets actually go through the WANEm machine.

WANEm Web Console in Advanced Mode

So, we have a very easy-to-use, functional software for free! Seems great! Too good to be true, wait, it’s not all; the documentation included is a delight. I don’t know if it’s the same for you, but I have spent hours trying to make some open-source software work because of poor or inexistent documentation. Don’t get me wrong, open-source is great but sometimes the greatness of the piece of the software itself is at the cost of the documentation.

The WANEM Web console in basic mode

Anyway, they probably tought it wasn’t enough so they put a nice cherry at the top of the cake and created a VMWare server appliance with WANEm configured.

Finally because everything ought to have a default, WANEm is only available as a live-cd, even when provided in a virtual machine. Therefore the configuration isn’t persisted and you will have to reenter it every time you reboot the computer/vm, no big deal considering the few steps involved. It might even change soon as I read on their forum that a guy might have actually installed it on a drive (virtual or physical).

So if you need to emulate a WAN and don’t want/need to invest in an expensive Hardware solution, I strongly recommend you to give WANem a try at

Fiber Channel photo courtesy of Herrolm @ Flickr

Friday, April 17, 2009

Sorting / Filtering SharePoint RSS feeds

Really, REALLY BIG RSS feed button by photopia / HiMY SYeD on Ever wondered if it was possible to sort or filter the automatically generated SharePoint RSS feeds? Well I did and, as a matter of fact, I found a solution. The idea is very simple, you create the view that will filter or sort your list elements according to your needs. You then take the guid of your view and append it to the feed URL.

Et Voila !

Here is an example, let’s say I have a Task List (screenshot from a French MOSS farm, I am sure you’ll get the idea anyway) with some items pending, other finished. This status is defined in a “State” (Etat) column.


I first create two views filtering on the Etat column. One returns the pending elements, the other returns the finished elements.

I then take note of the guid of my two views (Editing the views and extracting the &View=….. part of the URL does the trick).

After making sure that RSS feeding is activated for my task list, I can go check the RSS feed at :


The results as displayed by IE7 looks like :


All the items are displayed whatever their status but let’s say that I want to see only the elements pending, so that I know what I need to work on. I just append "&View=<VIEW_GUID>" to the URL and here is the result :



By the way, I only tested this on a MOSS 2007 SP1 install. I would be interested to know if it works with WSS as well.

I wonder if this is documented anywhere as I stumbled upon this feature by pure chance ?

RSS picture credit Photopia on flickr

Sunday, April 05, 2009

Thinking of copying a locked SharePoint site collection ? Think twice !

clip_image002[7]I recently had to copy a locked SharePoint site collection from one farm to another farm. I soon realized this wasn’t such a great idea especially if the farms aren’t in the same AD domain. Here is a quick recap of what I noticed after a few more investigatory steps.

Eager readers will eagerly jump to the final conclusion.

Copying though stsadm backup/restore

Let’s try copying this site collection with the stsadm backup and restore commands. Both farms are MOSS RTM farms.

The backup worked smoothly. The restore is a total disaster (“Additions to this Web site have been blocked. Please contact the administrator to resolve this problem.”) :


The weirder part is that the collection is visible in the central administration but it seems totally messed up. No way to delete it from the Central Adminsitration. The stsadm deletesite command returns the “Additions to this Web site have been blocked. Please contact the administrator to resolve this problem.” error.

Conclusion : Not a good idea ! Might actually works using the trick I finally used, see below.

Copying using a SQL Server backup

Seemed like today would be another day battling with SharePoint. But I wasn't short on idea. Indeed My locked site collection was alone in its content DB, therefore I was able to use a backup to restore the collection on my target farm.

The restore wentsmoothly. I was starting to believe it was actually going to be easy!

And then my frail hopes were cruelly shattered by the terrible SharePoint truth when I opened up the Central Administration to change the collection administrator.

The first obvious step is to select the site collection but when selecting the site collection in the “Select Site Collection” popup, none of the collection details would appear on the right.


Huh ? I tried validating the popup anyway and was presented with this screen:


It seemed just as if I had selected nothing, yet the adress bar contained the id of the content database :


Trying to unlock this site collection would produce kind of the same result.

I then realized that the farm administrator had no right on the collection. He indeed had no permissions on the collection when it was backuped. Lucky me, the farms were part of the same domain, therefore I tried a quick and dirty fix, I added the original farm administrator to the target farm administrator group and logged in the Central Adminsitration with this administrator.

It was a relief to be able to see the details of the collection. Thou shan’t prevail over me SharePoint !

But once again, I underestimated my adversary which quickly retaliated with a now too common “Additions to this Web site have been blocked” when I tried changing the collection administrator.


But victory was mine at long last when I unlocked the collection while logged in with the original farm administrator account on the target farm. After this step I was able to change the collection administrator to the target farm administrator as I intended from the beginning.

Conclusion : It works, but both farms have to be in the same AD domain

Final Conclusion

If possible I would advise you to unlock the site collection before proceeding with the copy. If it isn’t possible, I hope both of your farms are part of the same AD domain, otherwise good luck! Please keep me posted if the powers that be are you on your side.

By the way, for those of you thinking that I should have tried the stsadm export command, one simply can’t export a locked site collection this way.