"There was an error while performing this operation"

Solution 1:

It turned out the website was using URL rewrite module which i was missing.

Downloaded web platform installer from MS and installed URL rewrite module.

http://www.microsoft.com/web/downloads/platform.aspx

Wish IIS errors were more informative than just "There was an error..."

Solution 2:

It turned out the website was using URL rewrite module which i was missing.

This wasn't my problem and it was. I already had URL Rewriter installed, but after a Windows 10 upgrade IIS wasn't aware of it. A simple repair on Control Panel => Programs and Features => IIS URL Rewrite Module 2 and it was working again.