Issue
A DirSync profile is corrupted and causes the UI to crash when the profile is selected. You may receive an error such as "This application encountered an unexpected exception: Exception has been thrown by the target of an invocation" As the UI crashes when the profile is clicked, attempts to delete the profile from the UI have failed.
Solution
Delete the DirSync profile from the SQL database that DirSync was installed. Follow these steps:
- Note the name of the corrupted profile and close DirSync
- Open SQL Server Management Studio
- Connect to the SQL server
- Expand "Databases"
- Expand the database that Dirsync was installed to (Default is BTCodex)
- Expand "Tables"
- Right click on dbo.BT_Config and "Select Top 1000 rows"
- The table will be displayed on the right and will have an entry for each DirSync profile. Each one has a config XML link. Open each XML and search for an identifying feature such as the Name of the corrupted profile. Once found, note which row in the SQL table contains the corrupted profile.
- Once the corrupted profile is identified, right click again on dbo.BT_Config and "Edit Top 200 rows"
- Select the row that contains the corrupted profile and delete
- Reopen DirSync and confirm that the corrupted profile no longer appears