So I did what any reasonable person would do and google it. Unfortunately I got a lot of valid but incorrect responses. SO I thought I do a round-up of fixes
Fix 1: Manually add configSection groups
Nope...That was fixed in a service pack so that didn’t work
Fix 2: Re-register .NET 4 with IIS.
This could be it for many. The problem is that for devs using a standard pc with say Windows 7 installed won’t have IIS installed by default. You need to go to Add-Remove Windows Components thingy to install IIS. Problem is .NET4 is already installed so you can either re-install .NET4 or re-register it.
for 32 bit systems
for 64bit systems
Alas for me that didn’t fix it either.
Fix 3: It worked for me
I was looking through the web.config for any signs of syntax error, general gaff or buffoonery and then it hit me. I had rules declared in the web.config. I was using the MS Rewrite IIS extension on the production server. DOH! MS Rewrite wasn’t installed locally so couldn’t parse the section.
Downloaded code from here:
Installed and website appeared.