Troubleshooting FIM: Failed to connect to specified database. The extension operation aborted due to an internal error in FIM Synchronization Service

Issue

When attempting to create the FIM Service Management Agent we see an error on the 'Connect to Database' section of the MA configuration.

https://microsoft.sharepoint.com/teams/iamsupport/iamblog/SiteAssets/extension_operation_1.png 

Resolution

 Swapping the supportedRuntime lines in the miiserver.exe.config resolved the issue. 

<startup useLegacyV2RuntimeActivationPolicy="true">

     <supportedRuntime version="2.0.50727"></supportedRuntime>

     <supportedRuntime version="v4.0"</supportedRuntime>

</startup>