WebMatrix launch failed, ERROR: IIS 7.5 Express could not be initialized

In this blog, we will have a look at one of the issues we face after a successful install of WebMatrix. WebMatrix fail to launch and the error it throws is “IIS 7.5 Express could not be initialized. Please make sure that it is installed and configured correctly”.

WMerror

Error Stack:

System.ApplicationException: IIS 7.5 Express could not be initialized. Please make sure that it is installed and configured correctly. ---> System.ArgumentNullException: Value cannot be null.
Parameter name: type
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at Microsoft.Web.VersionManager.IisVersionManager..ctor()
at Microsoft.WebMatrix.Host.IisExpressHelperServiceImplementation.Initialize()
at Microsoft.WebMatrix.Host.IisExpressHelperServiceImplementation..ctor()
--- End of inner exception stack trace ---
at Microsoft.WebMatrix.Host.IisExpressHelperServiceImplementation..ctor()
at Microsoft.WebMatrix.Host.Shell.ShellApplication.Initialize(Boolean localDevelopmentMode, Boolean resetPreferences)
at Microsoft.WebMatrix.Host.Shell.ShellApplication.Execute(Boolean localDevelopmentMode, Boolean resetPreferences, Boolean resetPreferencesNoLaunch, Boolean warmupMode)

Cause:

The cause of this issue is left out bits from prior installation of Pre-release IIS 7.5 Express (beta1/beta2) on the machine in user profile folder.

Recommendations:

1) Uninstall IIS Express from Add/Remove programs. Reinstall IIS Express from here.

2) Remove IISExpress from My Documents and launch IISExpress from command line without passing any arguments. On Command Prompt, navigate to “C:\Program Files (x86)\IIS Express”, type in iisexpress and then hit enter.

3) Check if HKEY_CLASSES_ROOT\Microsoft.IIS.VersionManager exists and if it does, take ownership of this and use replace all child object permission with inheritable permission from this object.