When you try to install Exchange 2007/2010 on a brand new server or virtual machine running Windows Server 2008 operating systems, it throws the following exception when it tries to check the prerequisites installed.
The type initializer for ‘InstanceContext’ threw an exception.
In normal scenarios, you’ll never find this exception occurring. To resolve the issue, you have to make sure that the hostname of the server does not exceed 15 characters which is default limit for NetBIOS name resolution.
If the hostname of the servers is more than 15 characters, you will have to perform the following steps:
- Quit the Exchange setup.
- Remove the machine from the domain.
- Remove few characters from the hostname of the server
- Re-add the server to the domain.
- Re-run the setup.
This will resolve the issue and the setup will continue without any error.