Your backup is from a different version of Microsoft SharePoint Foundation

Given the task of migrating a Sharepoint 2010 web application, from quality assurance to the live environment, our team backed up the site using the Powershell  Cmdlet “Backup-SPSite”. Afterwards, we copied the backup file to the live farm and executed the “Restore-SPSite” Cmdlet. The following error message appeared:

Restore-SPSite : Your backup is from a different version of Microsoft SharePoint  Foundation and cannot be restored to a server running the current version. The backup file should be restored to a server with version '' or later.

After comparing the patch level on both farms, a missing security update was identified on the live farm. Having multiple applications hosted on the farm, the update roll-out was not an option.

So one of my colleagues found that the old school “stsadm” command allows the backup and restore of Sharepoint sites without checking the build number on the farm.

The solution was to use the following commands:

  1. On the Q&A server, open a command prompt and enter “cd C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>”
  2. Execute the following command:
  3. STSADM.EXE -o backup -url http://server/site -filename backup.dat
  4. Copy the resulting file to the live farm.
  5. On the live farm, open a command prompt and enter “cd C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN>”
  6. Execute the following command:
  7. STSADM.EXE -o restore -url http://server/site -filename backup.dat -overwrite
  8. Open the desired URL and check for your site’s correct update.


Thanks to Nelson!


Installing Sharepoint 2010 on server without Internet acess

Installing a server instance of Microsoft’s Sharepoint 2010 Server, I faced the following problem: the server had no Internet access and Sharepoint’s setup relies on downloading the pre-requisites from Microsoft, through the public Web.

The solution is to download the pre-requisites software and copy them to the server. Here’s a list for future reference:

Besides the pre~requisites don’t forget, if you’re deploying a new server on a farm, to download and install:
  • Windows language packs
  • Sharepoint language (Foundation and Server)
  • Security Updates

Requested registry access is not allowed

Having a custom developed Web Service hosted on Windows 2008 Server, after some fine tuning on the system, the service started to respond with a SOAP fault stating “Requested registry access is not allowed”.

The origin of the error was the attempt the service made to write on the Event Log.

One of the changes we had made to the application was the application pool identity. It was running on Classic mode with a given domain account and we re-configured it to run on integrated mode with the application pool identity.

To grant rights to a given user account for writing on the Event Log, you should perform the steps to edit the registry described here:

  1. Find key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog”
  2. Right-click and choose “Permissions”.
  3. Put in the desired account

The catch is that the application pool is running with the Application Pool Identity Account. This is a Windows user account called “IIS APPPOOL\AppPoolName”, which is created when the Application Pool is created, where AppPoolName is the name of the Application Pool.

On the permission dialog, search the local host for the “IIS APPPOOL\AppPoolName” replacing “AppPoolName” for your custom given name.

After that, the Web service worked fine.

Chrome browser slow on corporate network

Chrome is a really good browser and one of its highlights is the speed on starting up and rendering Web pages.

Having it installed on the corporate office workstation, I noticed it was much slower and taking forever to load some really simple stuff.

After some research on Google, I found and tested successfully the following scenario:

  • The proxy server is automatically configured through network policies.
  • Configuring the proxy server directly, without automatic configuration, restores Chrome to its full speed.
For people using Mac and Linux its a pretty straightforward operation. For Windows users such as myself, one might be trapped by security policies that don’t allow changes to proxy configuration by domain accounts.
A workaround for this security policy inhibition is, having local administration rights, to edit the registry:
  • Start/Run the “Regedit” tool
  • Find the key “HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings”
  • Set the ProxyEnable entry to “1”
  • Create a “ProxyServer” String entry and set it to «your proxy server address»:«port used» (ex:
  • Finally, go to your browser’s LAN settings and disable automatic configuration
Restart Chrome and it should be flying again 🙂

Posting SOAP request from Windows Powershell

A previous post on this blog showed how posting a SOAP request from the command line on Linux could be done.

Following the post about Invoke-Web-Request, I’ll show how to achieve the same task using Windows Powershell v3 CTP 1.

The first step is to build a sample SOAP request and save it on a text file, maybe called “soap.txt”. For the sake of this example I saved it on a temporary folder “C:\Temp”

Afterwards, open a powershell command prompt window and type this in:

Invoke-WebRequest http://[your web service endpoint address] -Method Post -ContentType "text/xml" -InFile C:\Temp\soap.txt -OutFile c:\Temp\soapRes.txt

The command has the following parameters:

  • method: indicating the request should be sent using HTTP POST
  • content type: stating the request is an XML message
  • input file: the SOAP request text file
  • output file: the name and path for saving the SOAP response

After execution, the resulting SOAP response is saved on the temporary folder under the name “soapresult.txt”.


Windows Powershell V3 includes command like wget/curl

The Windows Management Framework 3.0 – Community Technology Preview (CTP) has been released by Microsoft and with it comes Powershell V3.

Included on this release of powershell comes a command I’ve personally been missing for ages. A command to get or just test a given URL address. The is called:

A simple example of the command usage would be the get this blog’s home page into a single text file:

Invoke-WebRequest -OutFile c:\temp\blog.txt

Another example, more complex, would be to get this blogs RSS feed and parse it:

([xml](Invoke-WebRequest | Select Title, Link

To download the Windows Management Framework 3.0 CTP 1 visit this address from Microsoft.

Happy programming 🙂

Boot Windows 7 directly from Virtual Hard Disk image

An underrated feature from Windows 7 is its ability to boot directly from a VHD file without the need for additional virtualization software.

The advantage is evident: you can have different Windows 7 deployments on your machine without resort to virtualization software, thus using the full potential of your hardware.

Being a developer, a recurring challenge is to have a development environment setup that doesn’t permanently compromise the workstation’s performance. The compromise is consequence of sometimes having database and application servers, as well as different IDE all installed and running services at the same time.

Usual solution to avoid such compromise are:

  • having virtual machines, dedicated to each development scope, and using them individually without installing any development software on the host. However, virtualization can have a big cost on hardware performance.
  • Remote desktop to a hosted development environment instance. This limits the environment’s accessibility (usually to the workplace) and is not an option for small companies.

Given this options, the VHD boot architecture seems very attractive. the downside to this option is that its only available on the Ultimate and Enterprise versions of Windows.

To find a walk-through of common scenarios of native VHD boot, visit this technet’s page.

Judging by the way things progress, it’s will soon be possible to run Hyper-V on a Windows client OS system.