none
Microsoft Identity Manager 2016 - Extension-DLL-Exception RRS feed

  • Question

  • I am trying to run a full synchronization however since upgrading to the latest build 4.3.2064.0 I get the following extension-dll-exception. The stack trace is below:

    System.ArgumentException: parsing "<![CDATA[^([\!#\$%&'\*\+/\=?\^`\{\|\}~a-zA-Z0-9_-]+[\.]?)*[\!#\$%&'\*\+/\=?\^`\{\|\}~a-zA-Z0-9_-]+@{1}((([0-9A-Za-z_-]+)([\.]{1}[0-9A-Za-z_-]+)*([A-Za-z]){1,6})|(([0-9]{1,3}[\.]{1}){3}([0-9]{1,3}){1}))$]]>.Value" - Too many )'s.
       at System.Text.RegularExpressions.RegexParser.ScanRegex()
       at System.Text.RegularExpressions.RegexParser.Parse(String re, RegexOptions op)
       at System.Text.RegularExpressions.Regex..ctor(String pattern, RegexOptions options, TimeSpan matchTimeout, Boolean useCache)
       at Microsoft.MetadirectoryServices.GALSync.Synchronizer.IsMailValid(String& MailAddress)
       at Microsoft.MetadirectoryServices.GALSync.MVSynchronizer.AddOrRenameConnector(ConnectedMA& MA, GALMA& MAConfig, MVEntry mventry, CSEntry csentry)
       at Microsoft.MetadirectoryServices.GALSync.MVSynchronizer.Provision(MVEntry mventry)

    Monday, February 1, 2016 12:16 PM

Answers

  • I had the same issue. Server 2012r2, .NET 4.6, MIM Sync 4.3.2064.0. I tried updating to KB3134725 (Build 4.3.2124.0), with no change in behavior. If you take out that regex string and try to validate it, you'll see that it fails validation for the reason listed above (too many closing parentheses, or maybe not enough opening parentheses). Not being a regex wizard, I'm not able to correct the regex string, but I did work around it.

    Microsoft conveniently sends the source code of their GALSync and Logging DLLs as a part of the installer and if you look at the original 4.3.1935.0 GALUtil.vb file, you will see no regex validation of email addresses. Starting with 4.3.2064.0, there is regex validation; lines 377-380 for the string definition, lines 809-833 call those 2 regex patterns (functions IsMailValid and IsMailNickNameValid). Since I am working with internal objects and am positive that any object that is in scope will have a properly formed email address, I commented out lines 810,812,823,825 and changed the try clauses to unconditionally return true.

    If you are going to replicate what I did, have at least one Management Agent first, copy the GALSync.XML file from the install directory\extensions folder. Build the project, replace the newly generated GALSync.XML file with the original. Full synchronizations now work properly for me, at least until the next hotfix gets applied.

    Please note: Failure to keep a good copy of the xml file will cause no-start-ma after compiling the code.

    Hope that helps someone,

    Rick

    • Marked as answer by paulrimmer Thursday, March 31, 2016 10:10 AM
    Wednesday, March 23, 2016 10:56 PM

All replies

  • Assuming your regex for mail worked fine under the previous version of MIM, I would suggest opening a case with product support for investigation. Nothing in KB 3092179 indicates a change in regex behavior.

    Best,

    Jeff Ingalls

    • Proposed as answer by UNIFYBobMVP Monday, March 7, 2016 11:11 AM
    Tuesday, February 2, 2016 5:33 PM
  • Did you get this resolved by any chance
    Wednesday, March 2, 2016 3:43 PM
  • No,

    We narrowed this down to Windows Server 2012 R2 and the latest patch release compatibility. We down graded the server to server 2008.

    Thursday, March 3, 2016 9:58 AM
  • My guess here is that this is an issue/change that happened in .Net. If you're seeing this behavior change between OS versions and/or .Net updates that's probably your issue.

    Thanks,
    Brian

    Consulting | Blog | AD Book

    Friday, March 4, 2016 5:58 PM
    Moderator
  • I had the same issue. Server 2012r2, .NET 4.6, MIM Sync 4.3.2064.0. I tried updating to KB3134725 (Build 4.3.2124.0), with no change in behavior. If you take out that regex string and try to validate it, you'll see that it fails validation for the reason listed above (too many closing parentheses, or maybe not enough opening parentheses). Not being a regex wizard, I'm not able to correct the regex string, but I did work around it.

    Microsoft conveniently sends the source code of their GALSync and Logging DLLs as a part of the installer and if you look at the original 4.3.1935.0 GALUtil.vb file, you will see no regex validation of email addresses. Starting with 4.3.2064.0, there is regex validation; lines 377-380 for the string definition, lines 809-833 call those 2 regex patterns (functions IsMailValid and IsMailNickNameValid). Since I am working with internal objects and am positive that any object that is in scope will have a properly formed email address, I commented out lines 810,812,823,825 and changed the try clauses to unconditionally return true.

    If you are going to replicate what I did, have at least one Management Agent first, copy the GALSync.XML file from the install directory\extensions folder. Build the project, replace the newly generated GALSync.XML file with the original. Full synchronizations now work properly for me, at least until the next hotfix gets applied.

    Please note: Failure to keep a good copy of the xml file will cause no-start-ma after compiling the code.

    Hope that helps someone,

    Rick

    • Marked as answer by paulrimmer Thursday, March 31, 2016 10:10 AM
    Wednesday, March 23, 2016 10:56 PM
  • Thanks for the great write up Rick!
    Wednesday, March 30, 2016 8:46 PM