While working away on a web project this week, I had a heart-stopping moment when trying to connect to the web site/s – including SharePoint, K2, AchieveForms, and some custom web services and websites also.
First thing I noticed after firing up the VM, was that I couldn’t browse to the “home page”.
So, I went to have a look in the IIS manager – and this is what I saw.
Uuummm – IIS is empty ! Uh-oh !
So – I tried to do an IISRESET :
Attempting start…
Restart attempt failed.
IIS Admin Service or a service dependent on IIS Admin is not active. It most likely failed to start, which may mean that it’s disabled.
Alright then – so, I went to look for the IIS Admin service, within the “Services” area of Control Panel.
But – got the following error when trying to start :
Windows could not start the IIS Admin Service on Local Computer.
For more information, review the System Event Log.
Oh crap – this is getting WORSE !
So – peer into Event Log – and found the following error :
IIS Config – XML document must have top level element.
Configuration Source : C:WINDOWSsystem32inetsrv32MetaBase.xml
Got that sinking feeling like I’m back-pedalling somehow, but not actually moving.
I found the file within the INETSRV folder, and not surprised it’s error’ing – as the XML config file is size 0 KB ! (contents == nothing)
*eek*
OK – now, don’t panic !
Some quick web-searching, and the posts I’ve seen mention having to get a repair disk for Windows, and so on – sounds expensive (time).
I was sitting wondering if I have a backup copy of the VM somewhere ?!? And then I noticed the folder under “INSETSRV” – entitled “MetaBack” :
It looks like IIS takes a backup of it’s config, and saves it away in this folder – this could save me some time (aka save my butt)
There are TWO files in the folder :
Initial Backup – created automatically by IIS setup.SC1
Initial Backup – created automatically by IIS setup.MD1
Contains a whole heap of XML, with configuration settings and so forth. There are TWO files within the INETSRV folder also :
MBSchema.xml – looks to be OK
MetaBase.xml – busted / 0 KB
So – a quick look at the contents, and deduced that it’s the “Initial Backup – created automatically by IIS setup.MD1” file that I want/need.
After copying this over – and renaming to “MetaBase.xml” – I should be able to start the “IIS Admin” service – and then IISRESET, right ?
Success…!!
Attempting start…
Internet services successfully restarted
It’s alive – I can see the server and Application Pools + Web Sites within IIS.
But uh-oh, where’s SharePoint, K2, etc…!?!
A working IIS is no good to me without the actual “applications”…! I guess that MetaBack folder was simply some old (initial) version of the file/s.
*hhmmm*
Quick call to another developer, who has been dev’ing with a copy of the same VM, and asked him to email me the two files – MBSchema.xml + MetaBase.xml
*fingers crossed*
And…. Hey – now, we’re talking !!! They’re all back !
*phew* That coulda been a big-time burner !
I think I might actually set a scheduled task/reminder to take a backup copy of those files – could come in handy.
The golden files are these – for future reference :
MBSchema.xml – about 260 KB
MetaBase.xml – about 90 KB
C:WINDOWSSYSTEM32INETSRV
If you have a glitch like this (corrupted MetaBase) – have a look into the “MetaBack” folder, it might save you – or get you going again at least.