active directory - Microsoft AD GUID Mismatch -
this has been answered before, can't find life of me. have different systems, , of older ones have different ad guids same person when compared newer systems. guids similar, different. causing big problem in new app doing reading sql database form , older , newer app. here example, , older 1 this: 147e2a1e-579e-a143-88b9-d3a8ee00e609
, newer 1 1e2a7e14-9e57-43a1-88b9-d3a8ee00e609
. if read ad .net gives me "newer" guid. cause of this, , can fix it?
i have seen problem before. caused way different tools interpret bits in ad differently. bet can convert 1 other swapping things around. need figure out algorithm. wrote code fixed similar in 1 instance, may not fix yours, should on right path.
private shared function symmetricconversion(source guid) guid dim sourcestr = source.tostring() dim sb = new system.text.stringbuilder() 'group 1 sb.append(sourcestr.substring(6, 2)) sb.append(sourcestr.substring(4, 2)) sb.append(sourcestr.substring(2, 2)) sb.append(sourcestr.substring(0, 2)) sb.append(sourcestr.substring(8, 1)) 'group 2 sb.append(sourcestr.substring(11, 2)) sb.append(sourcestr.substring(9, 2)) sb.append(sourcestr.substring(13, 1)) 'group 3 sb.append(sourcestr.substring(16, 2)) sb.append(sourcestr.substring(14, 2)) 'groups 4 , 5 sb.append(sourcestr.substring(18, sourcestr.length - 18)) dim resultstr = sb.tostring() dim result = new guid(resultstr) return result end function
Comments
Post a Comment