DirectoryServiceLib.LdapProvider.Directory - CreatePost - Could not create employee for 195001010000,000000000000: System.Runtime.InteropServices.COMException (0x80005008): UnkNown error (0x80005008) at System.DirectoryServices.PropertyValueCollection.PopulateList
当我在WinDBG中捕获Exception以进一步分析时,我已经使用了memorydump.切换到正确的线程后,我执行了!Clrstack命令:
000000001b8ab6d8 000000007708671a [NDirectMethodFrameStandalone: 000000001b8ab6d8] Common.MemoryDump.MiniDumpWriteDump(IntPtr,Int32,IntPtr,MINIDUMP_TYPE,IntPtr) 000000001b8ab680 000007ff002808d8 DomainBoundILStubClass.IL_STUB_PInvoke(IntPtr,IntPtr) 000000001b8ab780 000007ff00280812 Common.MemoryDump.CreateMiniDump(System.String) 000000001b8ab7e0 000007ff0027b218 DirectoryServiceLib.LdapProvider.Directory.CreatePost(System.String,DirectoryServiceLib.Model.Post,DirectoryServiceLib.Model.Presumptions,Services.Common.sourceEnum,System.String) 000000001b8ad6d8 000007fef8816869 [HelperMethodFrame: 000000001b8ad6d8] 000000001b8ad820 000007feec2b6c6f System.DirectoryServices.PropertyValueCollection.PopulateList() 000000001b8ad860 000007feec225f0f System.DirectoryServices.PropertyValueCollection..ctor(System.DirectoryServices.DirectoryEntry,System.String) 000000001b8ad8a0 000007feec22d023 System.DirectoryServices.PropertyCollection.get_Item(System.String) 000000001b8ad8f0 000007ff00274d34 Common.DirectoryEntryExtension.GetStringAttribute(System.String) 000000001b8ad940 000007ff0027f507 DirectoryServiceLib.LdapProvider.DirectoryPost.copy(DirectoryServiceLib.LdapProvider.DirectoryPost) 000000001b8ad980 000007ff0027a7cf DirectoryServiceLib.LdapProvider.Directory.CreatePost(System.String,System.String) 000000001b8adbe0 000007ff00279532 DirectoryServiceLib.WCFDirectory.CreatePost(System.String,System.String) 000000001b8adc60 000007ff001f47bd Dynamicclass.SyncInvokeCreatePost(System.Object,System.Object[],System.Object[])
我的结论是它在代码调用时失败了
System.DirectoryServices.PropertyCollection.get_Item(System.String).
所以在发出!Clrstack -a之后我得到了这个结果:
000000001b8ad8a0 000007feec22d023 System.DirectoryServices.PropertyCollection.get_Item(System.String) ParaMETERS: this = <no data> propertyName = <no data> LOCALS: <CLR reg> = 0x0000000001dcef78 <no data>
我的第一个问题是为什么它没有显示属性名称的数据?我在Windbg上有点新鲜.但是我在= 0x0000000001dcef78上执行了一个dumpobject:
0:013> !do 0x0000000001dcef78 Name: System.String MethodTable: 000007fef66d6960 EEClass: 000007fef625eec8 Size: 74(0x4a) bytes File: C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll String: personalprescriptioncode Fields: MT Field Offset Type VT Attr Value Name 000007fef66dc848 40000ed 8 system.int32 1 instance 24 m_stringLength 000007fef66db388 40000ee c System.Char 1 instance 70 m_firstChar 000007fef66d6960 40000ef 10 System.String 0 shared static Empty >> Domain:Value 0000000000174e10:00000000019d1420 000000001a886f50:00000000019d1420 <<
因此,当源代码想要从Active Directory(用于持久层的内容)中获取个人订阅代码时,它就会失败.回顾堆栈时发出copy方法.
DirectoryServiceLib.LdapProvider.DirectoryPost.copy(DirectoryServiceLib.LdapProvider.DirectoryPost)
所以查看源代码:
DirectoryPost postInLimbo = DirectoryPostFactory.Instance().GetDirectoryPost(LdapConfigReader.Instance().GetConfigValue("LimboDN"),idGenPerson.ID.UserId); if (postInLimbo != null) newPost.copy(postInLimbo);
此代码在OU = limbo中查找具有相同UserId的另一个帖子,如果找到一个,则将属性复制到新帖子.在这种情况下确实如此,并且它与个人订阅代码失败.我在OU = Limbo下查看了Active Directory,帖子中存在属性personalprescriptioncode = 31243.
问题1:为什么它没有显示某些ParaMETERS和LOCALS的数据?是否在创建memorydump之前清理了GC.
问题2:我能做些什么才能解决这个问题?
解决方法
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。